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.
|
 |
08-11-2004, 08:35 PM
|
#1
|
Member
Registered: Mar 2004
Posts: 31
Rep:
|
mounting an smbfs share using mount vs /etc/fstab
I can use the following command to mount an smbfs share:
mount -t smbfs //WINPC//Main\ Drive /mnt/winm/ -o user="My Username",uid=1000,gid=users,password='My Password"
But how do I do it in /etc/fstab. I am trying this:
//WINPC/Main\ Drive /windows/M smbfs username='My Username',password='My Password',owner,ro 0 0
And nothing happens. What is the exact syntax for /etc/fstab?
Thanks!
|
|
|
08-11-2004, 09:16 PM
|
#2
|
LQ Newbie
Registered: Aug 2003
Posts: 12
Rep:
|
I do mine something like this:
//host1/e /mnt/host1 smbfs rw,uid=user,gid=users,credentials=<path to smb.cred file> 0 0
I use the smb.cred file to provide additional security.
With this setup, I can do 'mount -t smbfs' and all my mounts are done.
|
|
|
08-12-2004, 12:42 PM
|
#3
|
Member
Registered: Mar 2004
Posts: 31
Original Poster
Rep:
|
I followed your format
//WINPC/Main\ Drive /windows/M smbfs rw,uid=myuser,gid=users,credentials=/home/myuser/.smbpasswd 0 0
In my /home/myuser/.smbpasswd
username=My User
password=My Password
But i get this message on boot up:
line 10 in /etc/fstab is bad
Is it because there is a space in my share name? Is the \ not the right syntax?
Also, how do I test a new /etc/fstab without restarting the computer? I tried /etc/init.d/autofs but it did not tell me, for example, that line 10 was bad.
|
|
|
08-12-2004, 02:06 PM
|
#4
|
LQ Newbie
Registered: Aug 2003
Posts: 12
Rep:
|
Spaces
The space is probably the problem. You can get info on fstab via 'man fstab'. It says spaces or tabs separate fields in the file. You could try using quotes, but I would at least try a non-space name to make sure that's the problem.
Also, you can use:
mount /windows/M
to try out your fstab changes.
|
|
|
08-13-2004, 07:40 PM
|
#5
|
Member
Registered: Mar 2004
Posts: 31
Original Poster
Rep:
|
Hi. I found the answer. In /etc/fstab, no spaces are allowed. You have to use \040.
|
|
|
All times are GMT -5. The time now is 03:14 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
|
|