Table des matières

Authentication of client Ubuntu20 on ActiveDirectory of a nethServer7

Difficulté
Moyen

This works for a real machine and for a VM.
It seems not to work for an unprivileged container!! (no login possible)
⇒ Must be tested for a privileged container.

Main source: https://community.nethserver.org/t/howto-for-neth-7-as-ad-pdc-and-file-server-with-ubuntu-and-windows-clients/8685

Assuming that the ActiveDirectory of the NethServer is running properly:

Packages:

Install following packages on Ubuntu:

# apt-get install realmd ntp adcli sssd libsss-sudo libpam-mount cifs-utils samba-common smbclient krb5-user sssd-tools packagekit
Default Kerberos version 5 realm: => AD.DOMAIN.TLD
Kerberos servers for your realm: => host.ad.domain.tld
Administrative server for your Kerberos realm: => host.ad.domain.tld 

Kerberos

sssd

Modidy the conf file of sssd:

# nano /etc/sssd/sssd.conf
and modify following:
"default_shell" => "override_shell"
"fallback_homedir = /home/%u@%d" => "override_homedir = /home/%u"
"use_fully_qualified_names = True" => "use_fully_qualified_names = False"
add at the end: "access_provider = permit" 
# systemctl restart sssd
# systemctl status sssd
followinf message seem to be "normal":
tkey query failed: GSSAPI error: Major = Unspecified GSS failure.  Minor code may provide more information, Minor = Server not found in Kerberos database.

# systemctl enable sssd

/home

For the create of the /home folder:

# pam-auth-update --enable mkhomedir

lightdm

With greeter “lightdm” (e.g. for Xubuntu) ⇒ nothing to do. The login via GUI works.

Fine tuning: create /etc/lightdm/lightdm.conf.d/00-hide-user-list.conf and insert:

[SeatDefaults]
greeter-hide-users=true
greeter-show-manual-login=true
allow-guest=false

pam_mount

Auto mount of distant folders:

Despite this media/samba-host and /media/nfs-host must be created by hand and get chmod 777

Unmount by logout

LXDE

The logout doesn't unmout the shares automatically mounted at login ⇒ the next user can access them inspite he doesn't have the needed permissions.
In order to avoid this:

Forr Xubuntu (XFCE): enter “lightdm” instead of “lxdm” for all commands and parameters

Gnome

# nano /etc/gdm/PostSession/Default     ### and add into it:
umount /media/samba-host/* 
DokuWiki Appliance - Powered by TurnKey Linux