Click to See Complete Forum and Search --> : mounting shared network drives


dthomp325
04-21-2004, 06:00 PM
Ok I want to mount some shared directories on my network, so I added this line to my fstab file:
//***.***.*.***/data2 /mnt/data2 smb username=****,password=**** 0 0

The directories mount just fine, but only from root. How do I do it so that any user can mount the directory? Also, how do I set up a link in KDE that will automaticly mount it, when it is clicked on. And third, is there a way to do it, so that the username, and password is not sitting around in plain-text. I'm running an HD-install of Knoppix 3.3 (based on Debian)

Thanks
-dave

gehidore
04-21-2004, 06:16 PM
add auto and rw to the end

mdwatts
04-22-2004, 09:17 AM
Originally posted by dthomp325

The directories mount just fine, but only from root. How do I do it so that any user can mount the directory?

Have a look at the mount manpage (man mount) under the smb section (which will point you to nfs) for uid, gid and umask.

Hayl
04-22-2004, 09:28 AM
Originally posted by dthomp325
Ok I want to mount some shared directories on my network, so I added this line to my fstab file:
//***.***.*.***/data2 /mnt/data2 smb username=****,password=**** 0 0

The directories mount just fine, but only from root. How do I do it so that any user can mount the directory? Also, how do I set up a link in KDE that will automaticly mount it, when it is clicked on. And third, is there a way to do it, so that the username, and password is not sitting around in plain-text. I'm running an HD-install of Knoppix 3.3 (based on Debian)

Thanks
-dave

don't put user names and passwords into /etc/fstab. anyone can read that file.

create /home/your_username/.smb_password

add two lines to the file

username=your_username
password=your_password

then chmod 700 /home/your_username/.smb_password (to make it so only your account can read it. alternatively you can chown the file as well so only root can read it)

then change your fstab line to:

//***.***.*.***/data2 /mnt/data2 smb credentials=/home/your_username/.smb_password 0 0

+ whatever other options u want added for that mount point in your fstab.