Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

For some strange reason samba doenst parse any of the % variables i use in smb.conf. u use centos 6 64Bit and samba is installed with yum via surnet-samba repo.

%u %U are not working even %v doesnt do anything.

the domain controller itself is working great only user folders and home drivers are not working becouse of this. 1 even tryed %USERNAME% and %USERACCOUNT% but still nothing.

here is my smb.conf:

# Global parameters
  server string = Samba %v
    workgroup = FLAXE
realm = FLAXE.LAN
netbios name = PDC
server role = active directory domain controller
server services = rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbind, ntp_signd, kcc, dnsupdate, smb
dcerpc endpoint servers = epmapper, wkssvc, rpcecho, samr, netlogon, lsarpc, spoolss, drsuapi, dssetup, unixinfo, browser, eventlog6, backupkey, dnsserver, winreg, srvsvc
  domain logons = Yes 
  os level = 65
  preferred master = Yes 
  domain master = Yes 
logon drive        = H:
logon home         = \\%L\%u
logon path         = \\%L\profiles

path = /var/lib/samba/sysvol/flaxe.lan/scripts
read only = No

path = /var/lib/samba/sysvol
read only = No

   path                    = /home/Profiles
   comment                 = Network Profiles Share
   writable                = Yes
   browseable              = No
   csc policy              = disable
   profile acls            = yes
   create mask             = 0770
   force create mode       = 0770
   force directory mode    = 0770
   root preexec            = PROFILE='/home/Profiles/%ACCOUNTNAME%'; if [ ! -e $PROFILE     ]; #                then mkdir -pm700 $PROFILE; chown '%ACCOUNTNAME%':'%g' $PROFILE;fi
   copy              = profiles

   path              = /home/Users/
   comment           = %v 
   writable          = Yes
   browseable        = Yes
   root preexec            = HOMES='/home/Users/%ACCOUNTNAME%'; if [ ! -e $HOMES ]; #                    then mkdir -pm700 $HOMES; chown '%ACCOUNTNAME%':'%g' $HOMES;fi

Some system outputs:

smbclient -L localhost -U N.Laemers

Enter N.Laemers's password:
Domain=[FLAXE] OS=[Unix] Server=[Samba 4.0.14-SerNet-RedHat-8.el6]

        Sharename       Type      Comment
        ---------       ----      -------
        netlogon        Disk
        sysvol          Disk
        profiles        Disk      Network Profiles Share
        profiles.v2     Disk      Network Profiles Share
        Home            Disk      %v
        IPC$            IPC       IPC Service
    Domain=[FLAXE] OS=[Unix] Server=[Samba 4.0.14-SerNet-RedHat-8.el6]

    Server               Comment
    ---------            -------

    Workgroup            Master
    ---------            -------

wbinfo -i N.Laemers
FLAXE\N.Laemers:*:3000019:100:Nico Laemers:/home/FLAXE/N.Laemers:/bin/false

getent passwd
FLAXE\N.Laemers:*:3000019:100:Nico Laemers:/home/FLAXE/N.Laemers:/bin/false


Does anyone have any clue why this isnt working ??

Running samba 4.0 now but had the same problem with 4.1

share|improve this question
Dint find the answer yet. but created a new server and build samba from source. now it works perfect. TIP: before using ./configure make sure u have openldap-devel –  Nico Laemers Feb 14 '14 at 8:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.