Running a mount script on login
I am trying to build an image for an educational enviroment where Debian will be used as the OS.
mount -t cifs //Newtrinity/Users/$USER $HOME/Desktop/u.drive -o username=$USERNAME,password=$PASSWORD This command command does not work because a $PASSWORD variable does not exist. I need this so a user can login and have their network drives mapped automatically without having to input any extra information. Anyone know a variable that I can use or how to create one? Also to mount with this command you need to be root. How can I allow users to have permission to mount there drives when they login. I have tried SUID set user id but this does work for this scenario. chmod 6777 script chmod 6777 /sbin/mount.cifs Apparantly allowing scripts to run as root is a security risk so they are ignored and the mount.cifs, well just doesn't do much either. It does work for things like fdisk though. I have been inserting the script path in /etc/profile to make it run which only executes sometimes. By the way security is not a concern so please leave those statements out thanks. |
The pmount package will allow users to mount media without root privileges.
|
Quote:
Code:
PASSWORD=123456 |
PASSWORD=123456 will not work as it is a variable that will change as all users will have different login passwords
pmount can only mount local filesystem can't it? |
Try autofs http://linux.die.net/man/5/autofs
|
All times are GMT -5. The time now is 12:18 PM. |