View previous topic :: View next topic |
Author |
Message |
donkeyb n00b
Joined: 07 Jul 2006 Posts: 3
|
Posted: Fri Jul 07, 2006 2:06 pm Post subject: Samba, cifs and getting fstab to automount shares |
|
|
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 |
|
|
Raniz l33t
Joined: 13 Sep 2003 Posts: 967 Location: Varberg, Sweden
|
Posted: Fri Jul 07, 2006 10:05 pm Post subject: |
|
|
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 |
|
|
donkeyb n00b
Joined: 07 Jul 2006 Posts: 3
|
Posted: Sat Jul 08, 2006 1:57 pm Post subject: Hi Raniz |
|
|
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 |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3943 Location: Hamburg
|
Posted: Sat Jul 08, 2006 2:50 pm Post subject: |
|
|
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 |
|
|
donkeyb n00b
Joined: 07 Jul 2006 Posts: 3
|
Posted: Mon Jul 17, 2006 12:06 pm Post subject: |
|
|
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 |
|
|
|