

Code: Select all
# emerge --ask --noreplace net-fs/samba
Where does it say that? Setting up Samba as an Active Directory Domain Controller references bind-tools, but not samba-tools. Setting_up_Samba_as_an_Active_Directory_Domain_Controller only mentions tools as regards to other programs you should disable.antoniovalos wrote:I am reading the article, and it tells me to use "samba-tools"
Code: Select all
# emerge -pv1 net-fs/samba
These are the packages that would be merged, in order:
[ebuild R ] net-fs/samba-4.18.0::gentoo USE="acl addc ads client json ldap pam python regedit syslog winbind zeroconf -ceph -cluster -cups -debug (-fam) -glusterfs -gpg -iprint -llvm-libunwind -profiling-data -quota (-selinux) -snapper -spotlight (-system-heimdal) -system-mitkrb5 -systemd (-test) -unwind" CPU_FLAGS_X86="aes" PYTHON_SINGLE_TARGET="python3_11 -python3_9 -python3_10" 0 KiBCode: Select all
samba-tool domain provision \
--realm=$REALM \
--domain=$DOMAIN \
--server-role=dc \
--dns-backend=BIND9_DLZ \
--host-ip=$HOSTIP \
--host-ip6=$HOSTIP6 \
--function-level=2008_R2 \
--use-rfc2307
Code: Select all
# samba-tool domain provision --use-rfc2307 --interactive
Code: Select all
Unable to determine the DomainSID, can not enforce uniqueness constraint on local domainSIDs
Code: Select all
~# eselect rc restart samba
Restarting init script
setterm: terminal xterm does not support --blank
* samba -> start: smbd ...
* start-stop-daemon: failed to start `/usr/sbin/smbd' [ !! ]
* samba -> start: nmbd ...
* start-stop-daemon: failed to start `/usr/sbin/nmbd' [ !! ]
* Error: starting services (see system logs)
* samba -> stop: smbd ...
* start-stop-daemon: no matching processes found [ ok ]
* samba -> stop: nmbd ...
* start-stop-daemon: no matching processes found [ ok ]
* ERROR: samba failed to start
Code: Select all
[2023/04/11 13:37:53.739473, 0] ../../source3/smbd/server.c:1741(main)
smbd version 4.16.9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2022
[2023/04/11 13:37:53.745364, 0] ../../source3/smbd/server.c:1798(main)
main: server role = 'active directory domain controller' not compatible with running smbd standalone.
You should start 'samba' instead, and it will control starting smbd if required
Code: Select all
# Add "winbind" to the daemon_list if you also want winbind to start.
# Replace "smbd nmbd" by "samba4" if you want the active directory domain controller part or the ntvfs
# file server part or the rpc proxy to start.
# Note that samba4 controls 'smbd' by itself, thus it can't be started manually. You can, however,
# tweak the behaviour of a samba4-controlled smbd by modifying your '/etc/samba/smb.conf' file
# accordingly.
daemon_list="samba4"
...


Code: Select all
~# samba-tool user add adminserver
Code: Select all
Unable to determine the DomainSID, can not enforce uniqueness constraint on local domainSIDs
Code: Select all
samba-tool group listmembers Administrators
samba-tool user getgroups adminserverCode: Select all
host <name of DC>
host MYSERVER
host <IP address of MYSERVER>
Code: Select all
~# samba-tool group listmembers Administrators
Enterprise Admins
Domain Admins
Administrator
Code: Select all
~# samba-tool user getgroups adminserver
Domain Users

Code: Select all
Unable to determine the DomainSID, can not enforce uniqueness constraint on local domainSIDs
Yes, you can ignore this message.Unable to determine the DomainSID, can not enforce uniqueness constraint on local domainSIDs
~# samba-tool group listmembers Administrators
Enterprise Admins
Domain Admins
Administrator
So~# samba-tool user getgroups adminserver
Domain Users
Code: Select all
samba-tool group addmembers Administrators adminserver
