5

I am trying to mount windows machine directory in my ubuntu 10.04.3 server. When I try to see the shared directory in the windows server its showing properly using the below command. The windows mahcine is joined to local domain xyz.com

My doubt is, cant we mount the shared directory which is connected to local domain server? I am getting this error in both smbfs / cifs.

 smbclient -L //192.168.39.152/ -U svnbackup

    Sharename       Type      Comment
    ---------       ----      -------
    ADMIN$          Disk      Remote Admin
    Android         Disk
    C$              Disk      Default share
    CENTOS          Disk
    E$              Disk      Default share
    G$              Disk      Default share
    IPC$            IPC       Remote IPC
    Nagios          Disk
    test            Disk

When I try to mount the test directory using below command Its show error saying permission denied as below.

  mount.smbfs //192.168.39.152/test /mnt/smbfs -o username=username,password=Svn1234,domain=xyz.com
  mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Please help me to solve the issue.

Caterpillar
  • 1,122
  • 2
  • 22
  • 47
  • 1
    I hope that's not your *actual* password there. There's also a discrepancy between the IP address at the top of your question and the IP address at the bottom. – Ladadadada Mar 06 '12 at 10:15
  • Even I created a local user & tested, In that also I am facing same issue. Oh!! thats a typo error – Caterpillar Mar 06 '12 at 10:17
  • It might be bugs with the kernel, try to upgrade the kernel and check it – Mughil Mar 06 '12 at 10:25
  • Upgraded to 2.6.32-39 – Caterpillar Mar 06 '12 at 10:32
  • Can you confirm what user you're running the mount command as and that the `/mnt/smbfs` has the correct permissions. You need root permissions to mount filesystems unless the correct options are specified in `/etc/fstab` (`user`). – webtoe Mar 06 '12 at 11:35
  • I'm running the below command as root user. root@ubuntu:~# mount -t cifs //192.168.39.152/test -o username=svnbackup,password=Svn1234,domain=xys.com /mnt/cifs/ Directory Permission : drwxr-xr-x 2 root root 48 2012-03-06 18:16 smbfs – Caterpillar Mar 06 '12 at 12:47

3 Answers3

6

I've found solution on this site: Issue Mounting CIFS Share | ubuntuforums.org

Generally in Windows you should add this key in regedit. It works for me now. Key goes in: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

Key DWORD (32-bit): LocalAccountTokenFilterPolicy Key Value : 1

mivk
  • 3,457
  • 1
  • 34
  • 29
dePablo
  • 101
  • 1
  • 3
  • Note that this applies only starting with Vista, it has no effect on XP. – Stéphane Gourichon Jul 08 '15 at 15:46
  • 1
    Can set via PowerShell: `Set-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ -Name LocalAccountTokenFilterPolicy -Value 1` – Greg Bray Oct 28 '17 at 20:21
  • Do you need to restart the OS after the insert?, I tried with my Windows Server 2012 R2 but I still have the error (13). – рüффп Nov 08 '18 at 13:09
  • I just used this info to resolve the same issue trying to connect to the hidden admin shares on my Windows 10 laptop from an Ubuntu 18.04 LTS VirtualBox Guest VM. I did not have to restart either OS after creating the registry entry. – Paul M Edwards Apr 05 '19 at 00:11
  • Or use the simpler `reg.exe`. Paste this into an admin command prompt : `reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1` – mivk Feb 02 '20 at 18:26
3

try:

mount -t cifs //address/sharename /mnt/whatever \
-o `**username=DomainName/username**,password=password`

if it doesnt work, try:

mount.cifs //address/Share /mnt/share/ -o username=address/username

dont add a password, it should prompt u for one and possible it'll work, gl

rm-vanda
  • 247
  • 7
  • 18
3a2roub
  • 294
  • 4
  • 15
  • Thanks buddy, mount -t cifs //address/sharename /mnt/whatever -o username=DomainName/username,password=password This worked :-) Saved my life. – Caterpillar Mar 08 '12 at 13:48
  • glad i could help :) – 3a2roub Mar 08 '12 at 15:11
  • That worked! But I am trying to access a folder which is publicly shared and not password protected. But it still asks for password. Any suggestions? – zengr Mar 22 '13 at 22:28
0

Try cifs. smbfs is deprecated by cifs-utils. smbfs is used in Debian <= 3.

mount -t cifs //192.168.39.152/test -o \
  username=username,password=Svn1234,domain=xyz.com /mnt/smbfs
Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
user103373
  • 186
  • 6
  • 19
  • mount -t cifs //192.168.39.152/test -o username=username,password=Svn1234,domain=xys.com /mnt/smbfs/ mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) – Caterpillar Mar 06 '12 at 10:33