добавляю сопоставления
Код: Выделить всё
Администраторы
net groupmap add rid=512 ntgroup="Domain Admins" unixgroup=nt_admins
Код: Выделить всё
useradd -m -c "Admin" -G nt_admins -g users node
Код: Выделить всё
groups node
node : nt_admins users
Код: Выделить всё
net rpc rights grant "Domain Admins" SeMachineAccountPrivilege SeTakeOwnershipPrivilege SeBackupPrivilege
SeRestorePrivilege SeRemoteShutdownPrivilege SePrintOperatorPrivilege SeAddUsersPrivilege
SeDiskOperatorPrivilege -Unodea%123
вот конфиг:
Код: Выделить всё
[global]
workgroup = pdcsamba
netbios name = ssamba
server string = SERVER
passdb backend = tdbsam
log level = 1
log file = /var/log/samba/workstations/%m.log
max log size = 50
add user script = /usr/sbin/useradd -m %u
delete user script = /usr/sbin/userdel -r %u
add group script = /usr/sbin/groupadd %g
delete group script = /usr/sbin/groupdel %g
add user to group script = /usr/bin/gpasswd -a %u %g
delete user from group script = /usr/bin/gpasswd -d %u %g
add machine script = /usr/sbin/useradd -g nt_workstations -s /bin/false -d /dev/null %u
set primary group script = /usr/sbin/usermod -g %g %u
logon path =
logon drive =
logon home =
logon script = %G.bat
domain logons = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
hosts allow = 192.168. 127.
time server = yes
preferred master = yes
domain master = yes
local master = yes
os level = 255
unix charset = utf8
dos charset = cp1251
display charset = cp1251
[homes]
comment = Home Directories
browseable = no
writable = yes
[netlogon]
path = /srv/samba/netlogon
read only = yes
browseable = no
[incoming]
path = /srv/samba/incoming
writable = yes
create mask = 0775
directory mask = 0775
force group = users
[docs]
path = /srv/samba/docs
write list = @nt_admins
[distrib]
path = /srv/samba/distrib
write list = @nt_admins
[clients]
path = /srv/samba/clients
writable = yes
valid users = @managers