how can i run smbmount automatically when a user login
i want to use winxppro as my file server and linux(mandrake9.1)as a client.situation is of following
1.i have 5 directories on ntfs partitions on my winxppro(a,b,c,d,e,f).
2.i have 5 different users 1,2,3,4,5 who has diferent partitions on those directories.
3.i have 5 users with smbpaaswd created on my linux pc .
4.for each user i have written a scripts file where i have actually placed smbmount commands with proper permissions set for each user for each directory.e.g
smbmount //win/a /home/1/win rw,username=<>,password=<>,uid=<>,dmask=0765,fmask=0765
5.i have five scripts written for each user with different set of permiossions on diffferent directories
6. when user 1 runs this it asks for passwords for different directories and after providing proper passwords he can share directories on winxp with proper rights.
but users find it reallydifficult to provide passwords for each directories.so i want to run these scritps whenever a perticuler user logs in (locally), when they logoff locally these all mount points should be umounted automatically.
i belive there should be solution to this and somebody can help me to do this.
thanks in advance.
smbmount during gui login
Sorry I don't have an answer ... I have the basic same question.
Where does one put the smbmount command in order to mount drives in a user's home directory when that user logs in to a GUI (such a gnome, kde, etc):
smbmount //blahblah/blah ~/drives/blah rw,exec,guest
I would rather the smbmount command not run when the user accesses his/her profile via other mechanism such as ssh. Only mount the drives when he/she sits down at the workstation and opens a desktop manager (gnome, kde, enlightenment, fluxbox, etc).
.bashrc or .bash_profile should do it
Folder permissions should be set on the ntfs side, not on the client side.
You shouldnt need smbpasswd at all. The only time that should matter is if you are logging into a domain controller.
you can use fstab and sudo, probably with better security as well as then using credentials files(instead of username=blah, password=blah)that are only visible by root.
.bashrc and .bash_profile not good to automount drive
Thanks ... but adding smbmount to those files doesn't work as I'd like.
.bash_profile doesn't mount the drives at all.
.bashrc mounts them every single time I open a terminal such as gnome-terminal (multiple mounts of the same drive start stacking up for the same user).
Here's the code that I put at the end of .bash_profile and then at the end of .bashrc:
I'd also like the mount points to be release when the user logs out.
Better write all the mount commands in a shell script and call it form .bashrc...
but first check for already mounted file system in u r script file...
count=`mount | grep -c drives/books`
if [ count -lt 1 ]; then
# u r mount statement goes here
I feel you have to apply conditions for all your file systems... and the call this script from any file which is executed automatically, say at startup or say .bashrc
|All times are GMT -5. The time now is 03:27 PM.|