samba share setup on linux clients

jbk jbk-SkCWf5sxpj0sV2N9l4h3zg at public.gmane.org
Sun Jan 18 10:49:09 EST 2009


jbk wrote:
> I have a samba server and a new linux client that the 5 
> members of the family will use. Prior to this the client was 
> a win2000 machine with the shares defined per user as mapped 
> drives. I would like to create a similar functionality on 
> the new linux setup.
> What I want to achieve is to have these shares mapped when 
> they login so that when they open applications that store 
> data on the server the application finds the data.
> The server has shares defined per user and per users who are 
> members of certain groups.
> Jim KR

I have figured out in principle what to do but now I need 
some scripting help.

I have made mount.cifs setuid root and then I can add this 
to the bash_profile or as a bash script callable from there:

mount.cifs //server/share ~/sharemount -o 
credentials=~/.samba/.user

and in bash_logout:

umount.cifs ~/sharemount

This is working except if the server is off or the network 
is down, then the user login will hang waiting for the 
shares to mount.
So I would think a user script in ~/bin would be the thing 
to do. In this script I would want to test if the server is 
available and then if even better if the share is available. 
  Then mount the share if success else die gracefully 
without hanging the system. Even better would be to raise a 
gnome window with the message "Share <share> not available. 
Is the server on?"

I guess I could have the script just raise a terminal and 
print 2>&1 to the screen.

So does anyone have suggestions?

Jim KR





More information about the Discuss mailing list