vfs objects = acl_xattr map acl inherit = Yes store dos attributes = Yes
Replace workgroup, realm, netbios name and dns forwarder variables with your own custom settings. The winbind use default domain parameter causes winbind service to treat any unqualified AD usernames as users of the AD. You should omit this parameter if you have local system accounts names which overlap AD accounts.
8.Now you should restart all samba daemons and stop and remove unnecessary services and enable samba services system-wide by issuing the below commands.
9.Join Ubuntu machine to Samba4 AD DC by issuing the following command. Use the name of an AD DC account with administrator privileges in order for the binding to realm to work as expected.
$ cat /etc/nsswitch.conf # /etc/nsswitch.conf # # Example configuration of GNU Name Service Switch functionality. # If you have the `glibc-doc-reference' and `info' packages installed, try: # `info libc "Name Service Switch"' for information about this file.
14.In order to authenticate on Ubuntu machine with domain accounts you need to run pam-auth-update command with root privileges and add all the entries required for winbind service and to automatically create home directories for each domain account at the first login. 配置一下登录时候自动创建home目录。
| Pluggable Authentication Modules (PAM) determine how authentication, │ │ authorization, and password changing are handled on the system, as well as │ │ allowing configuration of additional actions to take when starting user │ │ sessions. │ │ │ │ Some PAM module packages provide profiles that can be used to automatically │ │ adjust the behavior of all PAM-using applications on the system. Please │ │ indicate which of these behaviors you wish to enable. │ │ │ │ PAM profiles to enable: │ │ │ │ [*] Unix authentication │ │ [*] Winbind NT/Active Directory authentication │ │ [*] Register user sessions in the systemd control group hierarchy │ │ [*] Create home directory on login 把这个勾上,这里都勾选,然后按确定 │ │ [*] GNOME Keyring Daemon - Login keyring management │ │ │ │ │ │ <确定> <取消>
It should now be able to perform logins on Ubuntu Desktop with a domain account using either your_domain_username or your_domain_username@your_domain.tld or your_domain\your_domain_username format.