View previous topic :: View next topic |
Author |
Message |
kristoczaj Apprentice


Joined: 18 Apr 2004 Posts: 201 Location: Poland
|
Posted: Thu Oct 06, 2005 9:39 pm Post subject: smbfs in fstab and password [SOLVED] |
|
|
Here's my situation:
line in fstab:
Code: | //ROUTER/root_dir /home/kristo/router smbfs user,credentails=/etc/router_smb_login 0 0 |
Ofcourse the file /etc/router_smb_login exists and contains data:
Code: | username = kristo
password = <kristos_smbpasswd_on_router>
|
Now here's problem no. 1: mount asks for password, and when I type it in, it mounts ok. But I don't want it to ask for password - I set up credentails!
Code: | kristo@mlotek ~ $ mount router/
Password:
|
And problem no. 2: user can't umount:
Code: | kristo@mlotek ~ $ umount router/
umount: only root can unmount //ROUTER/root_dir from /home/kristo/router
|
Code: | kristo@mlotek ~ $ ls -l
drwxr-xr-x 1 kristo users 4096 Oct 6 23:33 router/
|
Does anyone know what I'm doing wrong?
Last edited by kristoczaj on Sat Oct 08, 2005 10:41 am; edited 1 time in total |
|
Back to top |
|
 |
beandog Bodhisattva


Joined: 04 May 2003 Posts: 2072 Location: /usa/utah
|
Posted: Thu Oct 06, 2005 11:40 pm Post subject: |
|
|
Credentials only works with CIFS, not SMBFS.
Secondly, see man mount for the difference between "user" and "users".
Code: | //gateway/c$ /mnt/smb/gateway/c cifs credentials=/etc/cifs,noauto,uid=1000,gid=100,rw,users 0 0 |
_________________ If it ain't broke, tweak it. dvds | blurays | blog | wiki |
|
Back to top |
|
 |
kristoczaj Apprentice


Joined: 18 Apr 2004 Posts: 201 Location: Poland
|
Posted: Fri Oct 07, 2005 9:16 am Post subject: |
|
|
I'll try to make cifs work - thanks..
But about the second question:
man mount:
Code: | user Allow an ordinary user to mount the file system. The
name of the mounting user is written to mtab so that **he
can unmount the file system** again.(...)
users Allow **every user to mount and unmount** the file system.
|
So this doesn't explain why I can't umount right after mounting it.. nomatter, I'll switch to cifs anyway and see how it works.. Thanks again. |
|
Back to top |
|
 |
kristoczaj Apprentice


Joined: 18 Apr 2004 Posts: 201 Location: Poland
|
|
Back to top |
|
 |
SnarlCat n00b

Joined: 21 Sep 2005 Posts: 40
|
Posted: Fri Oct 07, 2005 1:46 pm Post subject: |
|
|
beandog wrote: | Credentials only works with CIFS, not SMBFS.
|
Not true at all; I have SMB filesystems mounted with the credentials file...
My /etc/smb.txt file looks like so:
Code: |
username=foo
password=pA55w0rD
|
(note the lack of spaces surrounding the equals sign; I found that with them it wasn't as happy)
Hope this helps... _________________ --
Our OS who art in CPU, UNIX be thy name.
Thy programs run, thy syscalls
done, In kernel as it is in user! |
|
Back to top |
|
 |
beandog Bodhisattva


Joined: 04 May 2003 Posts: 2072 Location: /usa/utah
|
Posted: Fri Oct 07, 2005 2:42 pm Post subject: |
|
|
It's credentials, not cred. Try that. _________________ If it ain't broke, tweak it. dvds | blurays | blog | wiki |
|
Back to top |
|
 |
beandog Bodhisattva


Joined: 04 May 2003 Posts: 2072 Location: /usa/utah
|
Posted: Fri Oct 07, 2005 2:43 pm Post subject: |
|
|
SnarlCat wrote: | beandog wrote: | Credentials only works with CIFS, not SMBFS.
|
Not true at all; I have SMB filesystems mounted with the credentials file...
My /etc/smb.txt file looks like so:
Code: |
username=foo
password=pA55w0rD
|
(note the lack of spaces surrounding the equals sign; I found that with them it wasn't as happy)
Hope this helps... |
Huh, that's cool. I had no idea. For some reason I thought it only worked with CIFS, but that's good to know. _________________ If it ain't broke, tweak it. dvds | blurays | blog | wiki |
|
Back to top |
|
 |
kristoczaj Apprentice


Joined: 18 Apr 2004 Posts: 201 Location: Poland
|
Posted: Sat Oct 08, 2005 10:40 am Post subject: |
|
|
beandog wrote: | (note the lack of spaces surrounding the equals sign; I found that with them it wasn't as happy) |
thanks, it is the spaces problem..
btw, heres why I had spaces there: man smbmount:
Code: | credentials=<filename>
specifies a file that contains a username and/or password. The
format of the file is:
username = <value>
password = <value>
|
beandog wrote: | It's credentials, not cred. Try that. |
cred is the same as credentails (man mount.cifs)
Thanks again all  |
|
Back to top |
|
 |
|