[Samba] smbmount
Joel Hammer
Joel at HammersHome.com
Fri Jan 3 03:28:02 GMT 2003
The path available to your startups scripts is not the same path available
to regular users. I would use /root/.credentials (Or where ever that file
is) instead of ~/.credentials.
Joel
On Thu, Jan 02, 2003 at 05:50:42PM -0800, George, John wrote:
> Joel,
> Thanks for the script commands. The smbmount command is working fine in the
> startup script as long as I use username= and password=, or
> username=username%password. However, when I try to use the credentials=
> option, I receive an error upon startup 'Can't open credentials'.
>
> I created a hidden file called credentials: ~/.credentials
>
> The format for the command is:
>
> smbmount //servername/sharename /mnt/sharename -o credentials=~/.credentials
>
> I can run the command manually and am successfull. I have also tried:
>
> chmod 777 ~/.credentials and am still only able to run this manually.
>
> I prefer to use the hidden credentials file.
>
> Thanks for your help!
>
> John
>
> -----Original Message-----
> From: Joel Hammer [mailto:Joel at HammersHome.com]
> Sent: Thursday, December 19, 2002 4:31 PM
> To: George, John; samba at lists.samba.org
> Subject: Re: [Samba] smbmount
>
>
> One way to is put the smbmount commands into your network startup script.
>
> Remember that you don't need to be running nmbd or smbd to run smbmount.
>
> So, in your network script, at the end of the start section, put in the
> smbmount commmand. This will run with root priviledge, so you might
> want to read about the uid and gid options of smbmount.
>
> I would also put an umount command in the shutdown part
> of the script, so these mounts will be gracefully umounted when the network
> goes down.
>
> I use this script to kill all smbmounts when my network goes down:
>
> mount | grep " type smbfs " | sed 's/^.*on *//' | sed 's/ *type.*//' \
> | sed 's/ /\\\ /g' | xargs -n1 -i{} umount {}
>
> I suspect there are simpler ways of getting this done, like killall
> smbmount, but, this works, at least on my machine.
>
> Joel
> On Thu, Dec 19, 2002 at 04:21:01PM -0800, George, John wrote:
> > Sorry, I restarted the machine.
> >
> > -----Original Message-----
> > From: Joel Hammer [mailto:Joel at HammersHome.com]
> > Sent: Thursday, December 19, 2002 4:17 PM
> > To: George, John; samba at lists.samba.org
> > Subject: Re: [Samba] smbmount
> >
> >
> > What are you restarting?
> >
> > Joel
> >
> > On Thu, Dec 19, 2002 at 04:08:02PM -0800, George, John wrote:
> > > Hi,
> > > I have successfully mounted 2 directories using smbmount. However, when
> I
> > > restart, they are no longer mounted.
> > >
More information about the samba
mailing list