scottws
January 2nd, 2020, 07:21 PM
I am following Ubuntu's guide for AD integration of Ubuntu 18.04 (https://help.ubuntu.com/lts/serverguide/sssd-ad.html), but I want to limit what domain users can log into the system based on AD group membership. I would also like to be able to allow AD users to use sudo (again, based on AD group membership and possibly a subset of AD users that can log in at all).
Where can I find documentation on how to accomplish this?
For reference, here are my relevant config files:
/etc/krb5.conf:
[libdefaults]
default_realm = DOMAIN.COM
kdc_timesync = 1
ccache_type = 4
forwardable = true
proxiable = true
fcc-mit-ticketflags = true
ticket_lifetime = 24h #
renew_lifetime = 7d
[realms]
DOMAIN.COM = {
kdc = server1.domain.com
kdc = server2.domain.com
kdc = server3.domain.com
kdc = server4.domain.com
kdc = server5.domain.com
kdc = server6.domain.com
kdc = server7.domain.com
kdc = server8.domain.com
kdc = server9.domain.com
admin_server = server1.domain.com
default_domain = DOMAIN.COM
}
[domain_realm]
.domain.com = DOMAIN.COM
domain.com = DOMAIN.COM
/etc/samba/smb.conf:
[global]
workgroup = DOMAIN
client signing = yes
client use spnego = yes
kerberos method = secrets and keytab
realm = DOMAIN.COM
security = ads
server string = %h server (Samba, Ubuntu)
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = no
/etc/sssd/sssd.conf:
[sssd]
services = nss, pam
config_file_version = 2
domains = DOMAIN.COM
[domain/DOMAIN.COM]
id_provider = ad
access_provider = ad
# Use this if users are being logged in at /.
# This example specifies /home/DOMAIN-FQDN/user as /home/svclinux. Use with pam_mkhomedir.so
override_homedir = /home/%d/%u
# Uncomment if the client machine hostname doesn't match the computer object on the DC.
# ad_hostname = hostname.domain.com
# Uncomment if DNS SRV resolution is not working
# ad_server = server1.domain.com
# Uncomment if the AD domain is named differently than the Samba domain
# ad_domain = DOMAIN.COM
# Enumeration is discouraged for performance reasons.
# enumerate = true
Where can I find documentation on how to accomplish this?
For reference, here are my relevant config files:
/etc/krb5.conf:
[libdefaults]
default_realm = DOMAIN.COM
kdc_timesync = 1
ccache_type = 4
forwardable = true
proxiable = true
fcc-mit-ticketflags = true
ticket_lifetime = 24h #
renew_lifetime = 7d
[realms]
DOMAIN.COM = {
kdc = server1.domain.com
kdc = server2.domain.com
kdc = server3.domain.com
kdc = server4.domain.com
kdc = server5.domain.com
kdc = server6.domain.com
kdc = server7.domain.com
kdc = server8.domain.com
kdc = server9.domain.com
admin_server = server1.domain.com
default_domain = DOMAIN.COM
}
[domain_realm]
.domain.com = DOMAIN.COM
domain.com = DOMAIN.COM
/etc/samba/smb.conf:
[global]
workgroup = DOMAIN
client signing = yes
client use spnego = yes
kerberos method = secrets and keytab
realm = DOMAIN.COM
security = ads
server string = %h server (Samba, Ubuntu)
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = no
/etc/sssd/sssd.conf:
[sssd]
services = nss, pam
config_file_version = 2
domains = DOMAIN.COM
[domain/DOMAIN.COM]
id_provider = ad
access_provider = ad
# Use this if users are being logged in at /.
# This example specifies /home/DOMAIN-FQDN/user as /home/svclinux. Use with pam_mkhomedir.so
override_homedir = /home/%d/%u
# Uncomment if the client machine hostname doesn't match the computer object on the DC.
# ad_hostname = hostname.domain.com
# Uncomment if DNS SRV resolution is not working
# ad_server = server1.domain.com
# Uncomment if the AD domain is named differently than the Samba domain
# ad_domain = DOMAIN.COM
# Enumeration is discouraged for performance reasons.
# enumerate = true