[Samba] Samba users profiles directory failing to mount in windows client

greep elem g33plm at gmail.com
Tue Oct 4 15:01:59 MDT 2011

I am having some issues with Samba with roaming profiles running on Ubuntu
server.  When a user logs in they get prompted with an error:

----windows error----------
Windows cannot locate the server copy of your roaming profile and is
attempting to log you
on with your local profile. Changes to the profile will not be copied to the
server when
you logoff. Possible causes of this error include network problems or
insufficient security
rights. If this problem persists, contact your network administrator.

DETAIL - The network path was not found.
----windows error----------

While trying to figure this out I believe I have found the problem but am
unsure how to fix it.  It would appear that for the "logon path =
\\%N\Profiles\%U" entry in smb.conf that the %N (or even %L) does not get
translated to the netbios name of the server.

doing the following command shows the %N still untranslated while the %U is
correctly updated to the user name

    # pdbedit -Lv testuser | grep Path
    Profile Path:         \\%N\profiles\testuser

If I manually hard code the %N  to the servers name instead of using %N or
%L the roaming profile works perfectly.

Can anyone point me in the right direction so as to resolve this issue?

Server setup:

    Ubuntu server 11.04
    Samba 3.5.8
    OpenLDAP 2.4.23
    Windows XP SP3 clients

smb.conf below:

--[ smb.conf
            workgroup = TESTDOMAIN
            netbios aliases = TESTSRV
            obey pam restrictions = Yes
            passdb backend = ldapsam:ldap://localhost
            passwd program = /usr/sbin/smbldap-passwd -u %u
            passwd chat = "Changing *\nNew password*" %n\n "*Retype new
password*" %n\n"
            passwd chat timeout = 4
            log level = 3
            syslog = 0
            log file = /var/log/samba/log.%m
            max log size = 1000
            add user script = /usr/sbin/smbldap-useradd -m '%u'
            delete user script = /usr/sbin/smbldap-userdel %u
            add group script = /usr/sbin/smbldap-groupadd -p '%g'
            delete group script = /usr/sbin/smbldap-groupdel '%g'
            add user to group script = /usr/sbin/smbldap-groupmod -m '%u'
            delete user from group script = /usr/sbin/smbldap-groupmod -x
'%u' '%g'
            set primary group script = /usr/sbin/smbldap-usermod -g '%g'
            add machine script = /usr/sbin/smbldap-useradd -w '%u'
            logon path = \\%N\Profiles\%U
            logon drive = H:
            domain logons = Yes
            preferred master = Yes
            domain master = Yes
            dns proxy = No
            wins support = Yes
            ldap admin dn = cn=admin,dc=testdomain
            ldap group suffix = ou=Groups
            ldap idmap suffix = ou=Idmap
            ldap machine suffix = ou=Computers
            ldap passwd sync = yes
            ldap suffix = dc=testdomain
            ldap ssl = no
            ldap user suffix = ou=Users
            panic action = /usr/share/samba/panic-action %d

            comment = Home Directories
            valid users = %S
            Read only = No
            browseable = No

            comment = Network Logon Service
            path = /home/samba/netlogon
            admin users = root
            guest ok = Yes
            browseable = No

            comment = Roaming Profile Share
            path = /home/samba/profiles
            read only = No
            profile acls = Yes
            browseable = No
--[ smb.conf

More information about the samba mailing list