[Samba] CentOS 6.5 + Samba 4.1.6 - Variable Substitution (smb.conf)
Daniel Müller
mueller at tropenklinik.de
Tue May 27 06:25:57 MDT 2014
Just use prexec=syourscriptname/command
In your [home] section.
Or login to a admin pc start rsat and choose the user, properties profile
there connect to: \\yourdc\home\%username%
EDV Daniel Müller
Leitung EDV
Tropenklinik Paul-Lechler-Krankenhaus
Paul-Lechler-Str. 24
72076 Tübingen
Tel.: 07071/206-463, Fax: 07071/206-499
eMail: mueller at tropenklinik.de
Internet: www.tropenklinik.de
-----Ursprüngliche Nachricht-----
Von: samba-bounces at lists.samba.org [mailto:samba-bounces at lists.samba.org] Im
Auftrag von Pascal Blétard
Gesendet: Dienstag, 27. Mai 2014 13:00
An: samba at lists.samba.org
Betreff: [Samba] CentOS 6.5 + Samba 4.1.6 - Variable Substitution (smb.conf)
Hello everyone.
So, I come to you because I have a little problem when setting up my domain
controller based on CentOS 6.5 and Samba 4.1.6.
Everything works well, except for one small detail, which in my case
blocking me.
I
would like to automatically generate the home directory of the user during
the first connection (from Win or Linux), but the problem is that for some
unknown reason, the variable substitution does not work in the smb.conf
I tested various alternatives for the user name, for example, but none
works.
Here is my smb.conf
[global]
workgroup = ADS
realm = ADS.LOCAL
netbios name = BOOS17
server role = active directory domain controller
dns forwarder = 172.16.130.7
server services = rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbind,
ntp_signd, kcc, dnsupdate, dns, smb
dcerpc endpoint servers = epmapper, wkssvc, rpcecho, samr, netlogon,
lsarpc, spoolss, drsuapi, dssetup, unixinfo, browser, eventlog6, backupkey,
dnsserver, winreg, srvsvc
idmap_ldb:use rfc2307 = yes
[netlogon]
path = /usr/local/samba/var/locks/sysvol/ads.local/scripts
read only = No
[sysvol]
path = /usr/local/samba/var/locks/sysvol
read only = No
[home]
comment = %U %USERNAME% %ACCOUNTNAME% %USERACCOUNT% %u Home
Directory
path = /home/ADS
read only = No
[Global Share]
comment = Global %D %DOMAIN% %DOMAINNAME% Share
path = /home/globalshare
valid users = User1
read list = User1
write list = User1
read only = No
guest ok = Yes
None of the variables used is replaced.
Here is the result of an example smbclient command:
# smbclient -L localhost -U Administrator -c 'ls'
Enter Administrator's password:
Domain=[ADS] OS=[Unix] Server=[Samba 4.1.6]
Sharename Type Comment
--------- ---- -------
netlogon Disk
sysvol Disk
home Disk %U %USERNAME% %ACCOUNTNAME% %USERACCOUNT%
%u Home Directory
Global Share Disk Global %D %DOMAIN% %DOMAINNAME% Share
IPC$ IPC IPC Service
Domain=[ADS] OS=[Unix] Server=[Samba 4.1.6]
Server Comment
--------- -------
Workgroup Master
--------- -------
I dont really know where the problem is.
Someone would have an idea?
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
More information about the samba
mailing list