content:en_us:kb_howtos_add_centos8_workstation_to_the_samba_domain

Add a Centos 8 Workstation to the Samba Domain

You can add a Linux workstation to your ClearOS Domain. This howto will show you the steps that you need to take to get your Centos 8 workstation to use domain credentials to authenticate.

Preparation

This guide assumes you have a full installation of Centos 8 and was based on v8.3 which was current t the time of writing. It also assumes you have full root access.

All commands should be entered in a root shell.

If you do not have full root access, all commands should be prefaced by the command “sudo” or you should enter a root shell with the command “sudo su -”

Install Packages

dnf install samba-common-tools samba-winbind samba-winbind-clients

Set Up Samba

In the /etc/samba/smb.conf, make the [global] section look like:

	domain master = No
	security = DOMAIN
	client min protocol = NT1
	template shell = /bin/bash
	template homedir = /home/%U
	winbind use default domain = Yes
	workgroup = Your_domain_name
	idmap config * : range = 3000-7999
	idmap config * : backend = tdb
	idmap config HOME : range = 10000000-19999999
	idmap config HOME : backend = rid
	wins server = The_ip_address_of_your_DC
	netbios name = MyMachineName

Substitute Your_domain_name, The_ip_address_of_your_DC and MyMachineName for the correct values.

You can leave in the default printing parameters which are already in the global section
The default ClearOS domain name (Workgroup) is CLEARSYSTEM, but you may have changed yours.
The “wins server” setting may be unnecessary
It is best to set a netbios name for each machine or it will use the dns name which could change if you make entries for it in the server's DNS server

Join the domain

net rpc join -U winadmin -I The_ip_address_of_your_DC

or:

net rpc join -U winadmin -S The_FQDN_of_your_DC

Start Winbind

systemctl enable winbind --now

You are now fully joined but we then need to fix up authentication so users can log in and their home directories created.

Fix PAM and nsswitch.conf and enable creation of Homes

systemctl enable oddjobd --now
authselect select winbind with-mkhomedir

Reboot

 reboot & exit

Notes

In the older documentation for a Linux (Ubuntu) machine, home folders were created under /home/Your_domain_name/. If you want to do this, in the smb.conf, change the line:

	template homedir = /home/%U

to:

	template homedir = /home/%D/%U

search?q=clearos%2C%20clearos%20content%2C%20clearos5%2C%20clearos6%2C%20clearos7%2C%20domain%2C%20centos%2C%20centos8%2C%20categoryserver%2C%20kb%2C%20howtos%2C%20maintainer_nhowitt&btnI=lucky

content/en_us/kb_howtos_add_centos8_workstation_to_the_samba_domain.txt · Last modified: 2021/02/25 10:20 by 84.9.57.48