4

I have a staging server in my network running Ubuntu server 10.10, being my main development area. As I need to access the files in the Apache root from other computers in the network, I have setup samba with the following settings:

[www]
    comment = Apache root www
    path = /var/www
    writable = yes
    force user = root
    force group = root

On the host computer, running Ubuntu 10.10 desktop, I am trying to mount the drive with a bash file looking like below:

#!/bin/bash
sudo mount -t cifs //192.168.1.5/www /media/www/ -o username=myusername,password=mypassword,rw,iocharset=utf8,file_mode=0777,dir_mode=0777

What happens is that I get mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) thrown in my face whilst trying to execute the mount.

I've done exactly the same, with exactly the same smb.conf & mount-bash file on another computer in my network, but this just wont work.

What am I doing wrong? I am running out of ideas.

5
  • 1
    If someone wonders, I've run smbd restart after editing the /etc/samba/smb.conf file...
    – Industrial
    Feb 27, 2011 at 13:06
  • Did you check samba logs on server side (/var/log/samba/smbd.log or similar)?
    – Olli
    Feb 27, 2011 at 13:08
  • Yep - checked the log and the only thing that appears in the log is "[2011/02/27 14:16:53.770717, 0] printing/print_cups.c:108(cups_connect) Unable to connect to CUPS server localhost:631 - Connection refused" which I guess isn't related
    – Industrial
    Feb 27, 2011 at 13:20
  • Security in the smb.conf is set to user, if anyone cares
    – Industrial
    Feb 27, 2011 at 13:21
  • Well yes, CUPS message shouldn't relate to that in any way.
    – Olli
    Feb 27, 2011 at 13:34

1 Answer 1

0

Basic troubleshooting:

  1. Connect with smbclient -U myusername //192.168.1.5/www and see what happens
  2. Do same from server (not from remote host)
  3. Check /var/log/samba/smbd.log and /var/log/samba/log.[remote address]
  4. Increase samba logging level and retry. You can do this by adding log level = 3 to your smb.conf (and either restarting or sending HUP to smbd).
1
  • Thanks for your reply Olli. I was able to try out smbclient as shown in your answer and found out that a "NT_STATUS_LOGON_FAILURE" were thrown. I ran sudo smbpasswd -a myuser and everything worked out after a smbd restart! Thanks a lot!
    – Industrial
    Feb 27, 2011 at 15:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .