Ubuntu Server Guide
Download 1.23 Mb. Pdf ko'rish
|
ubuntu-server-guide (1)
- Bu sahifa navigatsiya:
- Automatic home directory creation
SSSD Configuration
The realm tool already took care of creating an sssd configuration, adding the pam and nss modules, and starting the necessary services. Let’s take a look at /etc/sssd/sssd.conf: [ s s s d ] domains = ad1 . example . com c o n f i g _ f i l e _ v e r s i o n = 2 s e r v i c e s = nss , pam [ domain / ad1 . example . com ] d e f a u l t _ s h e l l = / b i n / bash k r b 5 _ s t o r e _ p a s s w o r d _ i f _ o f f l i n e = True c a c h e _ c r e d e n t i a l s = True krb5_realm = AD1 .EXAMPLE.COM realmd_tags = manages−system j o i n e d −with−a d c l i i d _ p r o v i d e r = ad f a l l b a c k _ h o m e d i r = /home/%u@%d ad_domain = ad1 . example . com u s e _ f u l l y _ q u a l i f i e d _ n a m e s = True ldap_id_mapping = True a c c e s s _ p r o v i d e r = ad Note Something very important to remember is that this file must have permissions 0600 and ownership root:root, or else sssd won’t start! Let’s highlight a few things from this config: • cache_credentials: this allows logins when the AD server is unreachable • home directory: it’s by default /home/ a home directory of /home/john@ad1.example.com • use_fully_qualified_names: users will be of the form user@domain, not just user. This should only be changed if you are certain no other domains will ever join the AD forest, via one of the several possible trust relationships Automatic home directory creation What the realm tool didn’t do for us is setup pam_mkhomedir, so that network users can get a home directory when they login. This remaining step can be done by running the following command: 227 sudo pam−auth−update −−e n a b l e mkhomedir Checks You should now be able to fetch information about AD users. In this example, John Smith is an AD user: $ g e t e n t passwd john@ad1 . example . com john@ad1 . example . com : * : 1 7 2 5 8 0 1 1 0 6 : 1 7 2 5 8 0 0 5 1 3 : John Smith : / home/ john@ad1 . example . com : / b i n / bash Let’s see his groups: $ g rou ps john@ad1 . example . com john@ad1 . example . com : domain users@ad1 . example . com e n g i n e e r i n g @ a d 1 . example . com Note If you just changed the group membership of a user, it may be a while before sssd notices due to caching. Finally, how about we try a login: $ sudo l o g i n ad−c l i e n t l o g i n : john@ad1 . example . com Password : Welcome t o Ubuntu 2 0 . 0 4 LTS (GNU/ Linux 5.4.0 −24 − g e n e r i c x86_64 ) . . . C r e a t i n g d i r e c t o r y ’ / home/ john@ad1 . example . com ’ . john@ad1 . example . com@ad−c l i e n t : ~ $ Notice how the home directory was automatically created. You can also use ssh, but note that the command will look a bit funny because of the multiple *@* signs: $ s s h john@ad1 . example . com@10 . 5 1 . 0 . 1 1 Welcome t o Ubuntu 2 0 . 0 4 LTS (GNU/ Linux 5.4.0 −24 − g e n e r i c x86_64 ) ( . . . ) Last l o g i n : Thu Apr 16 2 1 : 2 2 : 5 5 2020 john@ad1 . example . com@ad−c l i e n t : ~ $ Note In the ssh example, public key authentication was used, so no password was required. Remember that ssh password authentication is by default disabled in /etc/ssh/sshd_config. Download 1.23 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling