LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Permanently mapping a Windows network share (https://www.linuxquestions.org/questions/linux-networking-3/permanently-mapping-a-windows-network-share-186589/)

gvaught 05-27-2004 01:24 PM

Permanently mapping a Windows network share
 
Greetings and oscillations:

I am not-such-a-noob, but I'm still struggling with some aspects of *nix. I am running a Slackware box on a Windows domain network. I can mount a share from one of the servers, but I hate having to mount it each time I logout/reboot. Can someone give me the command/syntax to enable this share to automount?

Here is my manual mount command:

mount -t smbfs -o username=me,password=random //srvr/share /netShare

This works fine, but it's just a pain in the neck to have to type that. I know there's a way to add this to the fstab file and/or set it up in a script that runs on boot up. I just don't know what the actual syntax is for either of these.

Help?

:confused:

flipboi 05-27-2004 07:55 PM

We have the same problem buddy. I don't know what's the correct syntax to be able add network drives in the fstab. Anyone?

Mathieu 05-27-2004 08:48 PM

To automatically mount a SMB share, you will need to edit your /etc/fstab file.
Use the following syntax:
Code:

//srvr/share /mnt/netShare smbfs defaults,user,username=myusername,password=random,uid=500,gid=100    0 0
The uid and gid are the user ID and group ID.
To obtain these IDs, at the command line, type: id

orange400 05-28-2004 12:24 AM

You can try adding that line to your /etc/rc.d/rc.local file.

gvaught 05-28-2004 11:06 AM

Thanks for the feedback!

I REALLY wanted the /etc/fstab entry syntax, but am also appreciative of the advice regarding the /etc/rc.d/rc.local entry. With these I should now be able to put myself on the same footing as the Win2k users on this network and not have to remount (rather than remap) these file systems every time I log in.

winsnomore 05-28-2004 05:36 PM

Guys .. is there a way so you won't have write the unencrypted passwd in fstab ?

MS3FGX 05-28-2004 05:44 PM

Not really.

What you would do is set your /etc/fstab security so that only root can read the file. That way only you can see them in the first place.

sharper 05-28-2004 09:14 PM

I have a share on the XP box with the same username and password as the user trying to mount it in Linux, and

mount -t smbfs //toy/mydocs /export/laptop

prompts for the user password and then mounts it. I don't seem to have to enter the name or password in the mount command.

would this be because the username and password for both boxes is the same? Or because I have the username and password in the smbpasswd file?


All times are GMT -5. The time now is 06:20 PM.