Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Samba, cifs and getting fstab to automount shares
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
donkeyb
n00b
n00b


Joined: 07 Jul 2006
Posts: 3

PostPosted: Fri Jul 07, 2006 2:06 pm    Post subject: Samba, cifs and getting fstab to automount shares Reply with quote

Hi,

I am having some strange problems and I was hoping that someone would be able to help.

I am trying to mount some shares that are sitting on a Win2k3 box. If I use the command:

mount.cifs //server/share /Mountpoint -ousername=administrator,password=password(not really!)

I get a mount error 13 = Permission denied error

If I try this command:

mount.cifs //server/share /Mountpoint -ousername=administrator,password=password(not really!),domain=DOMAIN

then all is good!

So for so good, however, I need to get these shares to automout at boot, so I have added the following line into /etc/fstab:

//server/share /Mountpoint cifs auto,rw,credentials=/home/wincred.txt 0 0

where wincred.txt contains:

username=administrator
password=password
domain=DOMAIN

and then run a mount -a, I get the same permission denied error.

I have also tried the following in /etc/fstab:

//server/share /Mountpoint cifs auto,rw,credentials=/home/wincred.txt,domain=DOMAIN 0 0

But still I get the permission denied error.

So, it seems like fstab is having some problem with this. Does anyone know what else I can try? Or is there another file that executes at boot-time where I can enter the mount.cifs command? (still a bit new to Linux so bear with me...)

Thanks very much in advance for any help that people may be able to offer.

Cheers

Phil


Last edited by donkeyb on Mon Jul 17, 2006 12:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
Raniz
l33t
l33t


Joined: 13 Sep 2003
Posts: 967
Location: Varberg, Sweden

PostPosted: Fri Jul 07, 2006 10:05 pm    Post subject: Reply with quote

did you remove the domain=DOMAIN entry in your credentials-file when you specified it in fstab?

man mount.cifs states:
Code:
credentials=filename
              specifies a file that contains a username and/or password. The format of the file is:


                        username=value
                        password=value
              This is preferred over having passwords in plaintext in a shared file, such as /etc/fstab. Be sure to protect any credentials file properly.

It might be that the password is being read incorrect if you've still got the domain=DOMAIN entry in there.
Back to top
View user's profile Send private message
donkeyb
n00b
n00b


Joined: 07 Jul 2006
Posts: 3

PostPosted: Sat Jul 08, 2006 1:57 pm    Post subject: Hi Raniz Reply with quote

Thanks for the reply, I did have the domain=DOMAIN entry in the credentials file, so I removed it but I am still getting the same errors.

Do you have any other ideas?

Thanks again

Phil
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Sat Jul 08, 2006 2:50 pm    Post subject: Reply with quote

The file permissions for /home/wincred.txt should be 0600 of owner root, btw I don't have to specify any DOMAIN entry.
Back to top
View user's profile Send private message
donkeyb
n00b
n00b


Joined: 07 Jul 2006
Posts: 3

PostPosted: Mon Jul 17, 2006 12:06 pm    Post subject: Reply with quote

Hi

I have checked the permissions to the file and all is OK. It seems that the domain is required when using mount.cifs, but there is no way to specify this in the fstab entry (it appears to ignore it).

Has anyone else seen this before?

Cheers

Phil
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