LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   smbmount - permission denied (https://www.linuxquestions.org/questions/linux-networking-3/smbmount-permission-denied-285153/)

Kalidor 02-01-2005 09:49 PM

smbmount - permission denied
 
Hello folks,

This problem has been posted before, but so far no one who did was able to get an answer. Anyway, here goes... maybe I'm lucky and someone has an idea what the problem is by now.

I have two servers, both with Windows 2003 and a lonely Linux box which tries to mount shares from these servers via Samba.

Now, winbind authentication and everything is working perfectly fine, BUT as soon as I use a Samba version higher than 3.0.2a or 3.0.3 I have problems with mounted shares. Interestingly mounting them works fine without any errors in logs, but as soon as I try to list the directory content of one of these I get "ls - permission denied".

Of course I made sure that the permissions are right for the mount point, I have been playing around off and on for several months with parameters in fstab - to no avail. Everytime a new Samba version is released I try and end up having to go back to 3.0.2a to be able to mount these shares.

Oh and, mounting them via CIFS works fine, I do not get any such error messages when accessing shares that way. But alas CIFS currently has problems with shares of a distributed file system which renders it useless for my purposes.

Does anyone out there know how to fix either of these problems? If more information is required please let me know.

Thanks.

jerky 02-01-2005 10:09 PM

fstab
 
I assume you want to mount the remote address by name, to do this you have to have proper Wins resolution, either by Query or Wins server on local broadcast.

mount -t smbfs //SERVERNAME/SERVERSHARE /mnt/SHARE -o username=user1,password=123456

another way is to have text file, with root read-only persmission (chmod 600) containing with this context
call it whatever you like, put it in the directory you want to mout, ie /mnt/SHARE/pass

username = user1
password = 123456

You then can add in your /etc/fstab , an arguement "credentials=/mnt/SHARE/pass"

This will then call the file to supply the password authentication to your windows share. See "man smbmount"

in your /etc/fstab, more options can be applied
/mnt/SHARE //SERVERNAME/SHARE smbfs credentials=/mnt/SHARE/pass 0 0


See "man fstab"



Also verify in your /etc/samba/smb.conf , that your

interfaces = eth0
remote browse sync = 192.168.1.255
remote announce =192.168.1.255

Verify these are correct for your network configuration, this will help resolve WINS name resolution. Add Static names to local /etc/samba/lmhosts file.


Kalidor 02-01-2005 10:18 PM

Thanks for your quick response.

I am actually using a credentials file (located in /etc/samba). Aside from the different location of the credentials file the lines in /etc/fstab looks just like your example (with a ro parameter).

As I said, it works fine like this with Samba 3.0.2a and 3.0.3 but not with a version higher than this.

But I run into the same problem even if I do a command line smbmount with a credentials file or not. This is a really confusing problem.

WINS resolution is working fine, it does mount the share just fine. I just cannot access anything in it afterwards. A normal "ls" shows the mount point but when I do "ls -la" the mount point is invisible. Curiously I can "cd" into the mount point, but a "ls" results in the "permission denied" problem I mentioned.

I can access samba shares from the windows machines and I can access windows shares with smbclient. Only smbmount is giving me a headache.


All times are GMT -5. The time now is 08:56 AM.