LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Map a network drive (https://www.linuxquestions.org/questions/linux-software-2/map-a-network-drive-500036/)

keogk 11-09-2006 07:31 AM

Map a network drive
 
Hello all
I have a Fedora box that has a bunch of shares on it that runs samba. This is all it does. It is called server.
I have a Mephis 6 box that I want to be able to map shares on the fedora box when it starts up.
I put this in my fstab
smbmount //SERVER/notes /mnt/notes -o username=jack,password=jack12
That did not work so I removed the smbmount and put this in
//SERVER/notes /mnt/notes -o username=jack,password=jack12
when the system starts up it still does not mount the share
I was going thru a system logfile and it said error //SERVER/notes /mnt/notes -o username=jack,password=jack12 mount: only root can do that.
Everything I have read said to do it this way.
Also the notes share and all the shares are public anyone can access them and everybody has access to the server so the passwords are a formality so we don't care if they are cleartext in fstab.
Is there some other way to do this on startup other then fstab?
I was thinking I would like it if some shares like the /home/jack on the Fedora server was mapped to the Mephis box when jack logged in as well as the other shares like notes,music,videos,etc
I can mount the shares after I log in but when all is said and done there will e about 4-8 folders on the server I access so I would rather they get mounted when I start up.

fordeck 11-09-2006 11:15 AM

One place this can be done is in the users .bash_profile file. This is run everytime the user logs in. So you should be able to map/mount your directories this way.

haertig 11-09-2006 11:41 AM

Quote:

Originally Posted by keogk
Is there some other way to do this on startup other then fstab?

Is there some reason you DON'T want to do this using fstab? If the issue is just that your current fstab entry doesn't work, here's the fstab entry I use for something similar (the sharing computer is "192.168.0.53" fixed IP, it's shared resource is "f", and local mountpoint is "/mnt/livingroom/f" ):
Code:

//192.168.0.53/f  /mnt/livingroom/f  smbfs  fmask=0777,dmask=0777,credentials=/etc/cred  0 0
And here's the (bogus-ized) contents of /etc/cred (file readable only by root):
Code:

#
# /etc/cred
#

# Credentials to mount Windows shares via SAMBA

username = arthur_dent
password = qn(*^#$w0rQ_7Wt5a]sr453*&^*(^TYG*2t66


keogk 11-10-2006 08:26 AM

Map a drive
 
haertig
The method you posted worked Thanks.
The reason I was thinking of not doing it with fstab is that 2 maybee 3 people will use the system with different lagon names
and I was going to have the system also map there home folder on the server. So I did not want one user to have another users home folder mounted. But Threy all now how to browse so they just manually connect if they need the home folders.


All times are GMT -5. The time now is 11:22 AM.