Red Hat Configuration - How to mount a Windows share on boot?

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Configuration > January 2004 > How to mount a Windows share on boot?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to mount a Windows share on boot?
Jed Davidow

2004-01-23, 7:12 pm

I want to mount a windows share on boot. I added the following line to
'rc.local'. However, this caused the machine to hang at boot
occaisionally...

mount -t smbfs -o username=NAME,password=PASSWD //Win/Share /mnt/WinShare


When I run this from the command prompt, there is usually no problem.

But sometimes the command hangs, and never returns to the prompt. I use
^C to get a prompt back, and a mount command tells me that the share
mounted.

This seems to be what's causing the system to hang at boot.

-Is there a better way to mount a samba share at boot?
-Is there some way to prevent this hanging by changing the command?

Manually mounting the share is not an option, since the whole point of
this is to enable a backup/rsync to run, and I would like to not have to
worry about reboots, etc.

Thanks!

Lenard

2004-01-23, 7:12 pm

begin On Fri, 27 Jun 2003 21:12:06 +0000, Jed Davidow wrote:
quote:

> I want to mount a windows share on boot. I added the following line to
> 'rc.local'. However, this caused the machine to hang at boot
> occaisionally...
>
> mount -t smbfs -o username=NAME,password=PASSWD //Win/Share
> /mnt/WinShare
>
>
> When I run this from the command prompt, there is usually no problem.
>
> But sometimes the command hangs, and never returns to the prompt. I use
> ^C to get a prompt back, and a mount command tells me that the share
> mounted.
>
> This seems to be what's causing the system to hang at boot.
>
> -Is there a better way to mount a samba share at boot? -Is there some
> way to prevent this hanging by changing the command?
>
> Manually mounting the share is not an option, since the whole point of
> this is to enable a backup/rsync to run, and I would like to not have to
> worry about reboots, etc.
>
> Thanks!



You can add it to the /etc/fstab file with a line like(everything in a
single line);

//Win/Share /mnt/WinShare smbfs
auto,gid=users,umask=022,iocharset=iso88
59-15,credentials=/etc/winpassword
0 0

As root, create the /etc/winpassword file with the content;

username = NAME
password = PASSWD

and then assigned root-only read and write permissions with the command;

chmod 600 /etc/winpassword




--
end
If you cannot read this, use a non-Microsoft reader!!
This mail is Virus Free, no Microsoft products were used in it's distribution.

Lenard

2004-01-23, 7:12 pm

begin On Fri, 27 Jun 2003 21:12:06 +0000, Jed Davidow wrote:
quote:

> I want to mount a windows share on boot. I added the following line to
> 'rc.local'. However, this caused the machine to hang at boot
> occaisionally...
>
> mount -t smbfs -o username=NAME,password=PASSWD //Win/Share
> /mnt/WinShare
>
>
> When I run this from the command prompt, there is usually no problem.
>
> But sometimes the command hangs, and never returns to the prompt. I use
> ^C to get a prompt back, and a mount command tells me that the share
> mounted.
>
> This seems to be what's causing the system to hang at boot.
>
> -Is there a better way to mount a samba share at boot? -Is there some
> way to prevent this hanging by changing the command?
>
> Manually mounting the share is not an option, since the whole point of
> this is to enable a backup/rsync to run, and I would like to not have to
> worry about reboots, etc.
>
> Thanks!



You can add it to the /etc/fstab filewith a line like(everything in a
single line);

//Win/Share /mnt/WinShare smbfs
auto,gid=users,umask=022,iocharset=iso88
59-15,credentials=/etc/winpassword
0 0

As root, create the /etc/winpassword file with the content;

username = NAME
password = PASSWD

and then assigned root-only read and write permissions with the command;

chmod 600 /etc/winpassword



--
end
If you cannot read this, use a non-Microsoft reader!!
This mail is Virus Free, no Microsoft products were used in it's distribution.

Lenard

2004-01-23, 7:12 pm

begin On Fri, 27 Jun 2003 21:12:06 +0000, Jed Davidow wrote:
quote:

> I want to mount a windows share on boot. I added the following line to
> 'rc.local'. However, this caused the machine to hang at boot
> occaisionally...
>
> mount -t smbfs -o username=NAME,password=PASSWD //Win/Share
> /mnt/WinShare
>
>
> When I run this from the command prompt, there is usually no problem.
>
> But sometimes the command hangs, and never returns to the prompt. I use
> ^C to get a prompt back, and a mount command tells me that the share
> mounted.
>
> This seems to be what's causing the system to hang at boot.
>
> -Is there a better way to mount a samba share at boot? -Is there some
> way to prevent this hanging by changing the command?
>
> Manually mounting the share is not an option, since the whole point of
> this is to enable a backup/rsync to run, and I would like to not have to
> worry about reboots, etc.
>
> Thanks!



You can add it to the /etc/fstab file with a line like(everything in a
single line);

//Win/Share /mnt/WinShare smbfs
auto,gid=users,umask=022,iocharset=iso88
59-15,credentials=/etc/winpassword
0 0

As root, create the /etc/winpassword file with the content;

username = NAME
password = PASSWD

and then assigned root-only read and write permissions with the command;

chmod 600 /etc/winpassword




--
end
If you cannot read this, use a non-Microsoft reader!!
This mail is Virus Free, no Microsoft products were used in it's distribution.

Sasha

2004-01-23, 7:12 pm

add line to /etc/fstab
//Win/Share /mnt/WinShare smb username=name, password=password

Regards
Sasha

\\
"Jed Davidow" <jed@wireworkswest.com> wrote in message
news:Gq2La.141$i01.17466481@newssvr21.news.prodigy.com...
quote:

> I want to mount a windows share on boot. I added the following line to
> 'rc.local'. However, this caused the machine to hang at boot
> occaisionally...
>
> mount -t smbfs -o username=NAME,password=PASSWD //Win/Share /mnt/WinShare
>
>
> When I run this from the command prompt, there is usually no problem.
>
> But sometimes the command hangs, and never returns to the prompt. I use
> ^C to get a prompt back, and a mount command tells me that the share
> mounted.
>
> This seems to be what's causing the system to hang at boot.
>
> -Is there a better way to mount a samba share at boot?
> -Is there some way to prevent this hanging by changing the command?
>
> Manually mounting the share is not an option, since the whole point of
> this is to enable a backup/rsync to run, and I would like to not have to
> worry about reboots, etc.
>
> Thanks!
>




Sasha

2004-01-23, 7:12 pm

add line to /etc/fstab
//Win/Share /mnt/WinShare smb username=name, password=password

Regards
Sasha

\\
"Jed Davidow" <jed@wireworkswest.com> wrote in message
news:Gq2La.141$i01.17466481@newssvr21.news.prodigy.com...
quote:

> I want to mount a windows share on boot. I added the following line to
> 'rc.local'. However, this caused the machine to hang at boot
> occaisionally...
>
> mount -t smbfs -o username=NAME,password=PASSWD //Win/Share /mnt/WinShare
>
>
> When I run this from the command prompt, there is usually no problem.
>
> But sometimes the command hangs, and never returns to the prompt. I use
> ^C to get a prompt back, and a mount command tells me that the share
> mounted.
>
> This seems to be what's causing the system to hang at boot.
>
> -Is there a better way to mount a samba share at boot?
> -Is there some way to prevent this hanging by changing the command?
>
> Manually mounting the share is not an option, since the whole point of
> this is to enable a backup/rsync to run, and I would like to not have to
> worry about reboots, etc.
>
> Thanks!
>




Mike Pepe

2004-01-23, 7:13 pm

On Mon, 30 Jun 2003 03:59:41 GMT, Mike Pepe <lamune@doki-doki.net>
wrote:

quote:

>Are you running Red Hat 9? This problem never happened to me until I
>upgraded to 9.



I hate to follow up to myself, but in case anyone was still following
this topic: I solved the problem by building and installing a new
kernel from the generic source tree (not redhat source)


Mike Pepe

2004-01-23, 7:14 pm

On Mon, 30 Jun 2003 03:59:41 GMT, Mike Pepe <lamune@doki-doki.net>
wrote:

quote:

>Are you running Red Hat 9? This problem never happened to me until I
>upgraded to 9.



I hate to follow up to myself, but in case anyone was still following
this topic: I solved the problem by building and installing a new
kernel from the generic source tree (not redhat source)


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com