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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-11-2004, 07: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, 08: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, 11:42 AM
|
#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, 01: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, 06: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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:46 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
|
|