LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   cifs remote share (https://www.linuxquestions.org/questions/linux-networking-3/cifs-remote-share-646192/)

bobd72 06-01-2008 06:40 AM

cifs remote share
 
Hello,
I have two Kubuntu Hardy computers which I want to access a Remote Share on a Windaows XP machine. One is a desktop the other a Toshiba Laptop

Both machines have the same fstab entry:
//192.168.72.1/D$ /media/<my_share> cifs rw,credentials=/home/bob/<my_credentials_file>,uid=1000.gid=1000 0 0

and the same entry in the credentials file:
user= <MyUserName>
password=<MyPassword>

When I start the Desktop it mounts the remote share successfully. The Laptop will not mount the share either on boot or using mount

Using: sudo mount --verbose -a
*** The Laptop is trying to log on with the user 'root' instead of the user defined in the <credentials> file.

bob@Laptop:~$ sudo mount --verbose -a
mount: proc already mounted on /proc
parsing options: rw,credentials=/home/bob/<my_credentials_file>,uid=1000.gid=1000

Domain mydomain


mount.cifs kernel mount options unc=//192.168.72.1\D$,ip=192.168.72.1,user=root,domain=mydomain,pass=MyPassword,ver=1,rw,credentials=/home/bob/<my_credentials_file>,uid=1000.gid=1000
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

*** The Desktop sets the correct user and does not substitute root as the user.
mount.cifs kernel mount options unc=//192.168.72.1\D$,ip=192.168.72.1,user=MyUserName,domain=mydomain,pass=MyPassword,ver=1,rw,credentials =/home/bob/<my_credentials_file>,uid=1000.gid=1000

Both machines have the same smb.conf files

There must ba a setting orconfiguration somewhrere that is causing the substitution - but where?

stress_junkie 06-02-2008 09:29 AM

Here are a few ideas that are worth looking at. Clearly the problem comes from some difference in the Samba environment between the desktop and laptop computers.

First, the period in uid=1000.gid=1000 should be a comma. It probably doesn't cause a failure on the desktop because you are using the credentials option.

Next, are the desktop Linux machine and the Windows machine set up to be in a Windows workgroup or an NTLM security domain? Windows workgroup security is much easier to work with.

I had a couple of more ideas before I started typing but now I've forgotten them. I'll come back and edit this when I remember them.

bobd72 06-04-2008 04:55 AM

Quote:

Originally Posted by stress_junkie (Post 3172105)

First, the period in uid=1000.gid=1000 should be a comma. It probably doesn't cause a failure on the desktop because you are using the credentials option.

Thanks - fixed that but it made no difference


Quote:

Next, are the desktop Linux machine and the Windows machine set up to be in a Windows workgroup or an NTLM security domain? Windows workgroup security is much easier to work with.
Yes - I'm using a workgroup.

I have progressed a little since my initial post. I am now able to log onto to the share on the windows box if I don't use a credentials file but include user, pass and domain in the fstab entry as well as the 'nounix' option. Apparently this option is needed in Hardy, although it works OK without that on the Desktop machine. Whilst I still don't understand why this isn't a problem on the desktop at least it works on the Laptop now. As soon as I include a credentials file instead of the user/pass/domain it will not mount. I have tried placing the credentials file in both my home directory and in /root but neither works. Permissions appear to be OK.
Entries are as below:

//192.168.72.1/D$ /media/mount cifs user=username,pass=password,domain=MyWorkgroup,rw,nounix 0 0
#//192.168.72.1/D$ /media/mount cifs credentials=/root/.smb_credentials,rw,nounix 0 0


All times are GMT -5. The time now is 04:43 PM.