LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-27-2004, 02:24 PM   #1
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199

Rep: Reputation: 30
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?

 
Old 05-27-2004, 08:55 PM   #2
flipboi
Member
 
Registered: Oct 2003
Location: Manila
Distribution: Fedora Core 2, FreeBSD 5.2.1
Posts: 46

Rep: Reputation: 15
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?
 
Old 05-27-2004, 09:48 PM   #3
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
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
 
Old 05-28-2004, 01:24 AM   #4
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Rep: Reputation: 30
You can try adding that line to your /etc/rc.d/rc.local file.
 
Old 05-28-2004, 12:06 PM   #5
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199

Original Poster
Rep: Reputation: 30
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.
 
Old 05-28-2004, 06:36 PM   #6
winsnomore
Member
 
Registered: May 2004
Location: USA
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
Posts: 315

Rep: Reputation: 31
Guys .. is there a way so you won't have write the unencrypted passwd in fstab ?
 
Old 05-28-2004, 06:44 PM   #7
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
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.
 
Old 05-28-2004, 10:14 PM   #8
sharper
Member
 
Registered: Aug 2002
Location: MN USA
Distribution: slakware 9.0
Posts: 121

Rep: Reputation: 15
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mapping Windows share, then mirror data loadedmind Linux - Networking 5 02-07-2008 04:25 AM
mapping to a windows share and using files for a web server rstoutmna Linux - Networking 0 12-20-2004 11:47 AM
mapping windows network drives on a linux host kopite2012 Linux - Newbie 2 04-30-2004 11:00 AM
Mapping a network drive from Windows 2k to an ftp, Apache/1.3.27 Server DumbWindow$User General 5 04-08-2004 01:16 PM
mounting a windows network share? graystarr Linux - Networking 2 11-09-2002 06:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration