Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-27-2004, 02:24 PM
|
#1
|
Member
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199
Rep:
|
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?
|
|
|
05-27-2004, 08:55 PM
|
#2
|
Member
Registered: Oct 2003
Location: Manila
Distribution: Fedora Core 2, FreeBSD 5.2.1
Posts: 46
Rep:
|
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?
|
|
|
05-27-2004, 09:48 PM
|
#3
|
Senior Member
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403
Rep:
|
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
|
|
|
05-28-2004, 01:24 AM
|
#4
|
Member
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834
Rep:
|
You can try adding that line to your /etc/rc.d/rc.local file.
|
|
|
05-28-2004, 12:06 PM
|
#5
|
Member
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199
Original Poster
Rep:
|
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.
|
|
|
05-28-2004, 06:36 PM
|
#6
|
Member
Registered: May 2004
Location: USA
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
Posts: 315
Rep:
|
Guys .. is there a way so you won't have write the unencrypted passwd in fstab ?
|
|
|
05-28-2004, 06:44 PM
|
#7
|
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852
|
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.
|
|
|
05-28-2004, 10:14 PM
|
#8
|
Member
Registered: Aug 2002
Location: MN USA
Distribution: slakware 9.0
Posts: 121
Rep:
|
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 12:33 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|