[Samba] Mounting smbfs as guest at boot time

Sue Spence suespence99 at yahoo.co.uk
Sat Mar 2 02:37:03 GMT 2002


Thanks, yes, I understand that and have in fact
already done a lot of testing of the mount in various
places during the bootup sequence. I can show you the
smbfs control script if you like, but it is a standard
script of the sort (supports start/reload/stop/etc),
and it will correctly mount smbfs partitions when a
username/password is specified (i.e. not in guest
mode). 

I have found that it doesn't matter when I try to
mount an smbfs partition from a win2k server (the PC
OS is probably significant, possibly because win2k has
changed user security) *as guest* during the boot
process - it will fail as described in my initial
message to the list. 

So I would merely (haha) like to know why the
operation of mounting a win2k smbfs partition as guest
always fails anytime during boot and always works
after a user logs in and manually performs the
operation. 

If anyone can address this problem as stated then I'll
be very grateful.  So far it looks as though it just
can't be done. Somebody please prove me wrong!!

 --- Joseph Loo <jloo at acm.org> wrote: > If you want to
start after a particuliar phase of
> the boot, like the 
> end, checkout /etc/rc5.d directory. This is where
> all the automatic 
> startups when you are in the init run level 5 mode
> (last part of the 
> boot for the regular system).  Anything that starts
> with "S" will be 
> runned automatically in the script. Noter S1 will be
> runned before S99. 
> This is the standard convention in Linux I beleive.
> 
> 
> As a convention, place the script in /etc/init.d and
> link it into the 
> rc5.d directory. The script should be robust enough
> to accept a minimum 
> of 2 args kill and start. This is the convention to
> start an stop processes.
> 
> You should test your mount script by executing it as
> root to find any 
> errors. I use the following mount command:
> mount -t smbfs -o credentials=/root/bin/credential
> -o workgroup=gcsnt 
> //golcommon/Data /win/goleta 
> 
> where /root/bin/credential is a file with 2 lines:
> 
> username  =  yourusername
> password = passwordforyourusername
> 
> Joel Hammer wrote:
> 
> >Hmmm....
> >I would try to mount it from boot.local or whatever
> you think is the last
> >file run during the boot process. Redirect output
> to a log file.  Just add
> >1>logfile 2>logfile at the end of your smbmount
> command.
> >Reboot and look at the logfile.
> >Joel
> >
> >
> >On Thu, Feb 28, 2002 at 11:45:23PM +0000, Sue
> Spence wrote:
> >
> >>I wish you had replied to my most recent message,
> >>where I mentioned that I have in fact tried
> mounting
> >>the share in boot.local, which is the SuSE linux
> >>equivalent to rc.local. 
> >>
> >>I may give up and negotiate with the win2k admins
> to
> >>set me up some bogus user and then put a
> >>username/password string in the mount command.  I
> know
> >>that will work. It's just not gonna work as guest
> >>unless I background the mount during boot and let
> it
> >>keep trying until it finally succeeds, and that
> seems
> >>like a poor solution (even if it did work, and it
> >>probably would).
> >>
> >>FWIW I think this is a bug. I'm just not sure
> whose
> >>bug it is.
> >>
> >>
> >> --- Joel Hammer <Joel at HammersHome.com> wrote: 
> >>
> >>>I haven't tried this lately but:
> >>>I used to do as you want. I had a statement to
> mount
> >>>all my network shares
> >>>on my machine at boot. I put that command into
> >>>/etc/init.d/rc.local,
> >>>which, according to the documentation in
> rc.local,
> >>>is the last script run.
> >>>If running last IS important, you could just make
> up
> >>>your own script and
> >>>finagle with the startup script sequences to run
> >>>this script last. It
> >>>isn't hard, and there may well be a GUI to do
> this
> >>>for you.
> >>>I mount all my shares as guest, too.
> >>>These startup scripts I THINK run with root
> >>>permission. 
> >>>Why don't you post the exact commands your are
> >>>trying to use from a
> >>>startup script?
> >>>
> >>>Have you checked in /var/log/messages for errors
> >>>during boot?
> >>>
> >>>Joel
> >>>
> >>>
> >>>On Thu, Feb 28, 2002 at 12:11:20PM +0000, Sue
> Spence
> >>>wrote:
> >>>
> >>>> --- Joel Hammer <Joel at HammersHome.com> wrote: >
> >>>>
> >>>Have
> >>>
> >>>>you tried putting your mount command in
> >>>>
> >>>>>rc.local?
> >>>>>
> >>>>
> >>>>Yes. Isn't that actually earlier in the boot
> >>>>
> >>>process
> >>>
> >>>>than putting something like "mount -at smbfs" in
> >>>>
> >>>the
> >>>
> >>>>"start" section in /etc/init.d/smbfs (which is
> >>>>
> >>>then
> >>>
> >>>>executed when going to runlevel 2 because it is
> >>>>
> >>>linked
> >>>
> >>>>as S11smbfs in /etc/init.d/rc2.d)?
> >>>>
> >>>>There must be some minor but crucial environment
> >>>>difference between being anywhere in the boot
> >>>>
> >>>process
> >>>
> >>>>and being logged in which causes mounts as guest
> >>>>
> >>>to
> >>>
> >>>>fail. I would love to find out how to fix it, if
> >>>>possible.
> >>>>
> >>>>Best regards,
> >>>>Sue Spence
> >>>>
> >>>>
>
>>>>__________________________________________________
> >>>>Do You Yahoo!?
> >>>>Everything you'll ever need on one web page
> >>>>from News and Sport to Email and Music Charts
> >>>>http://uk.my.yahoo.com 
> >>>>
> >>__________________________________________________
> >>Do You Yahoo!?
> >>Everything you'll ever need on one web page
> >>from News and Sport to Email and Music Charts
> >>http://uk.my.yahoo.com
> >>
> >>-- 
> >>To unsubscribe from this list go to the following
> URL and read the
> >>instructions: 
> http://lists.samba.org/mailman/listinfo/samba
> >>
> >
> 
> -- 
> Joseph Loo
> jloo at acm.org
> 
> 
> 
> -- 
> To unsubscribe from this list go to the following
> URL and read the
> instructions: 
http://lists.samba.org/mailman/listinfo/samba 

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com




More information about the samba mailing list