Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
smbfs in fstab and password [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
kristoczaj
Apprentice
Apprentice


Joined: 18 Apr 2004
Posts: 201
Location: Poland

PostPosted: Thu Oct 06, 2005 9:39 pm    Post subject: smbfs in fstab and password [SOLVED] Reply with quote

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
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Thu Oct 06, 2005 11:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
kristoczaj
Apprentice
Apprentice


Joined: 18 Apr 2004
Posts: 201
Location: Poland

PostPosted: Fri Oct 07, 2005 9:16 am    Post subject: Reply with quote

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
View user's profile Send private message
kristoczaj
Apprentice
Apprentice


Joined: 18 Apr 2004
Posts: 201
Location: Poland

PostPosted: Fri Oct 07, 2005 9:51 am    Post subject: Reply with quote

I got stuck on the cifs:
https://forums.gentoo.org/viewtopic-p-2780715.html#2780715
Back to top
View user's profile Send private message
SnarlCat
n00b
n00b


Joined: 21 Sep 2005
Posts: 40

PostPosted: Fri Oct 07, 2005 1:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Fri Oct 07, 2005 2:42 pm    Post subject: Reply with quote

kristoczaj wrote:
I got stuck on the cifs:
https://forums.gentoo.org/viewtopic-p-2780715.html#2780715


It's credentials, not cred. Try that.
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Fri Oct 07, 2005 2:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
kristoczaj
Apprentice
Apprentice


Joined: 18 Apr 2004
Posts: 201
Location: Poland

PostPosted: Sat Oct 08, 2005 10:40 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum