В конфиге самбы:
Код: Выделить всё
add user script = /usr/local/sbin/smbldap-useradd -m "%u" -s "/bin/csh"
delete user script = /usr/local/sbin/smbldap-userdel "%u"
add group script = /usr/local/sbin/smbldap-groupadd "%g"
delete group script = /usr/local/sbin/smbldap-groupdel "%g"
add user to group script = /usr/local/sbin/smbldap-groupmod -m "%u" "%g"
set primary group script = /usr/local/sbin/smbldap-usermod -g "%g" "%u"
add machine script = /usr/local/sbin/smbldap-useradd -w "%u"
Код: Выделить всё
ldapsearch -x -LLL -b 'dc=gtss,dc=ru' 'uid=test1234$'
dn: uid=test1234$,ou=machines,dc=gtss,dc=ru
objectClass: top
objectClass: account
objectClass: posixAccount
cn: test1234$
uid: test1234$
uidNumber: 1166
gidNumber: 515
homeDirectory: /dev/null
loginShell: /bin/false
description: Computer
gecos: Computer
Код: Выделить всё
dn: uid=test123$,ou=machines,dc=gtss,dc=ru
objectClass: top
objectClass: account
objectClass: posixAccount
objectClass: sambaSamAccount
cn: test123$
uid: test123$
uidNumber: 1165
gidNumber: 515
homeDirectory: /dev/null
loginShell: /bin/false
description: Computer
gecos: Computer
sambaDomainName: GTSS
sambaAcctFlags: [W ]
displayName: test123$
sambaPrimaryGroupSID: S-1-5-21-...
sambaPwdLastSet: 1196846008
sambaSID: S-1-5-21-...