Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

samba share setup on linux clients



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






BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org