Samba 系列（十五）：用 SSSD 和 Realm 集成 Ubuntu 到 Samba4 AD DC
Samba SSSD
![](/data/attachment/album/201709/09/181412dtnflmmtymtod5py.jpg)


本教程将告诉你如何将 Ubuntu 桌面版机器加入到带有 SSSD 和 Realm 服务的 Samba4 活动目录域中，以在活动目录中认证用户。


### 要求：


1. [在 Ubuntu 上用 Samba4 创建一个活动目录架构](/article-8065-1.html)


### 第 1 步：初始配置


1、 在把 Ubuntu 加入活动目录前确保主机名被正确设置了。使用 `hostnamectl` 命令设置机器名字或者手动编辑 `/etc/hostname` 文件。



```
$ sudo hostnamectl set-hostname your_machine_short_hostname
$ cat /etc/hostname
$ hostnamectl

```

2、 接下来，编辑机器网络接口设置并且添加合适的 IP 设置，并将正确的 DNS IP 服务器地址指向 Samba 活动目录域控制器，如下图所示。


如果你已经配置了 DHCP 服务来为局域网机器自动分配包括合适的 AD DNS IP 地址的 IP 设置，那么你可以跳过这一步。


[![设置网络接口](/data/attachment/album/201709/09/181436ahce300hu5z5cdnc.jpg)](https://www.tecmint.com/wp-content/uploads/2017/07/Configure-Network-Interface.jpg)


*设置网络接口*


上图中，`192.168.1.254` 和 `192.168.1.253` 代表 Samba4 域控制器的 IP 地址。


3、 用 GUI（图形用户界面）或命令行重启网络服务来应用修改，并且对你的域名发起一系列 ping 请求来测试 DNS 解析如预期工作。 也用 `host` 命令来测试 DNS 解析。



```
$ sudo systemctl restart networking.service
$ host your_domain.tld
$ ping -c2 your_domain_name
$ ping -c2 adc1
$ ping -c2 adc2

```

4、 最后, 确保机器时间和 Samba4 AD 同步。安装 `ntpdate` 包并用下列指令和 AD 同步时间。



```
$ sudo apt-get install ntpdate
$ sudo ntpdate your_domain_name

```

### 第 2 步：安装需要的包


5、 这一步将安装将 Ubuntu 加入 Samba4 活动目录域控制器所必须的软件和依赖：Realmd 和 SSSD 服务。



```
$ sudo apt install adcli realmd krb5-user samba-common-bin samba-libs samba-dsdb-modules sssd sssd-tools libnss-sss libpam-sss packagekit policykit-1 

```

6、 输入大写的默认 realm 名称，然后按下回车继续安装。


[![输入 Realm 名称](/data/attachment/album/201709/09/181438hjwwb6nruxwrkw6x.png)](https://www.tecmint.com/wp-content/uploads/2017/07/Set-realm-name.png)


*输入 Realm 名称*


7、 接着，创建包含以下内容的 SSSD 配置文件。



```
$ sudo nano /etc/sssd/sssd.conf

```

加入下面的内容到 `sssd.conf` 文件。



```
[nss]
filter_groups = root
filter_users = root
reconnection_retries = 3
[pam]
reconnection_retries = 3
[sssd]
domains = tecmint.lan
config_file_version = 2
services = nss, pam
default_domain_suffix = TECMINT.LAN
[domain/tecmint.lan]
ad_domain = tecmint.lan
krb5_realm = TECMINT.LAN
realmd_tags = manages-system joined-with-samba
cache_credentials = True
id_provider = ad
krb5_store_password_if_offline = True
default_shell = /bin/bash
ldap_id_mapping = True
use_fully_qualified_names = True
fallback_homedir = /home/%d/%u
access_provider = ad
auth_provider = ad
chpass_provider = ad
access_provider = ad
ldap_schema = ad
dyndns_update = true
dyndsn_refresh_interval = 43200
dyndns_update_ptr = true
dyndns_ttl = 3600

```

确保你对应地替换了下列参数的域名：



```
domains = tecmint.lan
default_domain_suffix = TECMINT.LAN
[domain/tecmint.lan]
ad_domain = tecmint.lan
krb5_realm = TECMINT.LAN

```

8、 接着，用下列命令给 SSSD 配置文件适当的权限：



```
$ sudo chmod 700 /etc/sssd/sssd.conf

```

9、 现在，打开并编辑 Realmd 配置文件，输入下面这行：



```
$ sudo nano /etc/realmd.conf

```

`realmd.conf` 文件摘录：



```
[active-directory]
os-name = Linux Ubuntu
os-version = 17.04
[service]
automatic-install = yes
[users]
default-home = /home/%d/%u
default-shell = /bin/bash
[tecmint.lan]
user-principal = yes
fully-qualified-names = no

```

10、 最后需要修改的文件属于 Samba 守护进程。 打开 `/etc/samba/smb.conf` 文件编辑，然后在文件开头加入下面这块代码，在 `[global]` 之后的部分如下图所示。



```
workgroup = TECMINT
client signing = yes
client use spnego = yes
kerberos method = secrets and keytab
realm = TECMINT.LAN
security = ads

```

[![配置 Samba 服务器](/data/attachment/album/201709/09/181440khjfh6dmhff2pdpn.jpg)](https://www.tecmint.com/wp-content/uploads/2017/07/Configure-Samba-Server.jpg)


*配置 Samba 服务器*


确保你替换了域名值，特别是对应域名的 realm 值，并运行 `testparm` 命令检验设置文件是否包含错误。



```
$ sudo testparm

```

[![测试 Samba 配置](/data/attachment/album/201709/09/181442pm7zp3ogp72ss3z2.jpg)](https://www.tecmint.com/wp-content/uploads/2017/07/Test-Samba-Configuration.jpg)


*测试 Samba 配置*


11、 在做完所有必需的修改之后，用 AD 管理员帐号验证 Kerberos 认证并用下面的命令列出票据。



```
$ sudo kinit ad_admin_user@DOMAIN.TLD
$ sudo klist

```

[![检验 Kerberos 认证](/data/attachment/album/201709/09/181444h4dtt9e07zd7tno1.jpg)](https://www.tecmint.com/wp-content/uploads/2017/07/Check-Kerberos-Authentication.jpg)


*检验 Kerberos 认证*


### 第 3 步： 加入 Ubuntu 到 Samba4 Realm


12、 键入下列命令将 Ubuntu 机器加入到 Samba4 活动目录。用有管理员权限的 AD DC 账户名字，以便绑定 realm 可以如预期般工作，并替换对应的域名值。



```
$ sudo realm discover -v DOMAIN.TLD
$ sudo realm list
$ sudo realm join TECMINT.LAN -U ad_admin_user -v
$ sudo net ads join -k

```

[![加入 Ubuntu 到 Samba4 Realm](/data/attachment/album/201709/09/181447ou8pzkdygi7pj8gd.jpg)](https://www.tecmint.com/wp-content/uploads/2017/07/Join-Ubuntu-to-Samba4-Realm.jpg)


*加入 Ubuntu 到 Samba4 Realm*


[![列出 Realm Domain 信息](/data/attachment/album/201709/09/181449bfmd94dm96eor84h.jpg)](https://www.tecmint.com/wp-content/uploads/2017/07/List-Realm-Domain-Info.jpg)


*列出 Realm Domain 信息*


[![加入用户到 Realm Domain](/data/attachment/album/201709/09/181449kowj143j4g487taj.jpg)](https://www.tecmint.com/wp-content/uploads/2017/07/Add-User-to-Realm-Domain.jpg)


*添加用户到 Realm Domain*


[![表列 Realm Domain 信息](/data/attachment/album/201709/09/181449x3vzhe27b7vd33vh.jpg)](https://www.tecmint.com/wp-content/uploads/2017/07/Add-Domain-to-Realm.jpg)


*添加 Domain 到 Realm*


13、 区域绑定好了之后，运行下面的命令确保所有域账户允许在这台机器上认证。



```
$ sudo realm permit -all

```

然后你可以使用下面举例的 `realm` 命令允许或者禁止域用户帐号或群组访问。



```
$ sudo realm deny -a
$ realm permit --groups ‘domain.tld\Linux Admins’
$ realm permit user@domain.lan
$ realm permit DOMAIN\\User2

```

14、 从一个 [安装了 RSAT 工具的](/article-8097-1.html) Windows 机器上你可以打开 AD UC 并浏览“<ruby> 电脑 <rt>  computers </rt></ruby>”容器，并检验是否有一个使用你机器名的对象帐号已经创建。


[![确保域被加入 AD DC](/data/attachment/album/201709/09/181449mt2kuqdbyq4k5lyq.jpg)](https://www.tecmint.com/wp-content/uploads/2017/07/Confirm-Domain-Added.jpg)


*确保域被加入 AD DC*


### 第 4 步：配置 AD 账户认证


15、 为了在 Ubuntu 机器上用域账户认证，你需要用 root 权限运行 `pam-auth-update` 命令并允许所有 PAM 配置文件，包括为每个域账户在第一次注册的时候自动创建家目录的选项。


按 [空格] 键检验所有配置项并点击 ok 来应用配置。



```
$ sudo pam-auth-update

```

[![PAM 配置](/data/attachment/album/201709/09/181452ih09uu3e11tu41zy.jpg)](https://www.tecmint.com/wp-content/uploads/2017/07/PAM-Configuration.jpg)


*PAM 配置*


16、 在系统上手动编辑 `/etc/pam.d/common-account` 文件，下面这几行是为了给认证过的域用户自动创建家目录。



```
session    required    pam_mkhomedir.so    skel=/etc/skel/    umask=0022

```

17、 如果活动目录用户不能用 linux 命令行修改他们的密码，打开 `/etc/pam.d/common-password` 文件并在 `password` 行移除 `use_authtok` 语句，最后如下：



```
password       [success=1 default=ignore]      pam_winbind.so try_first_pass

```

18、 最后，用下面的命令重启并启用以应用 Realmd 和 SSSD 服务的修改：



```
$ sudo systemctl restart realmd sssd
$ sudo systemctl enable realmd sssd

```

19、 为了测试 Ubuntu 机器是是否成功集成到 realm ，安装 winbind 包并运行 `wbinfo` 命令列出域账户和群组，如下所示。



```
$ sudo apt-get install winbind
$ wbinfo -u
$ wbinfo -g

```

[![列出域账户](/data/attachment/album/201709/09/181454wnn111fux3ovonv0.jpg)](https://www.tecmint.com/wp-content/uploads/2017/07/List-Domain-Accounts.jpg)


*列出域账户*


20、 同样，也可以针对特定的域用户或群组使用 `getent` 命令检验 Winbind nsswitch 模块。



```
$ sudo getent passwd your_domain_user
$ sudo getent group ‘domain admins’

```

[![检验 Winbind Nsswitch](/data/attachment/album/201709/09/181456w3n6fabun2s392s1.jpg)](https://www.tecmint.com/wp-content/uploads/2017/07/check-Winbind-nsswitch.jpg)


*检验 Winbind Nsswitch*


21、 你也可以用 Linux `id` 命令获取 AD 账户的信息，命令如下：



```
$ id tecmint_user

```

[![检验 AD 用户信息](/data/attachment/album/201709/09/181457o40kbocfkb3bg4b9.jpg)](https://www.tecmint.com/wp-content/uploads/2017/07/Check-AD-User-Info.jpg)


*检验 AD 用户信息*


22、 用 `su -` 后跟上域用户名参数来认证 Ubuntu 主机的一个 Samba4 AD 账户。运行 `id` 命令获取该 AD 账户的更多信息。



```
$ su - your_ad_user

```

[![AD 用户认证](/data/attachment/album/201709/09/181457npiti0065gijz645.jpg)](https://www.tecmint.com/wp-content/uploads/2017/07/AD-User-Authentication.jpg)


*AD 用户认证*


用 `pwd` 命令查看你的域用户当前工作目录，和用 `passwd` 命令修改密码。


23、 在 Ubuntu 上使用有 root 权限的域账户，你需要用下面的命令添加 AD 用户名到 sudo 系统群组：



```
$ sudo usermod -aG sudo your_domain_user@domain.tld

```

用域账户登录 Ubuntu 并运行 `apt update` 命令来更新你的系统以检验 root 权限。


24、 给一个域群组 root 权限，用 `visudo` 命令打开并编辑 `/etc/sudoers` 文件，并加入如下行：



```
%domain\ admins@tecmint.lan              ALL=(ALL:ALL) ALL

```

25、 要在 Ubuntu 桌面使用域账户认证，通过编辑 `/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf` 文件来修改 LightDM 显示管理器，增加以下两行并重启 lightdm 服务或重启机器应用修改。



```
greeter-show-manual-login=true
greeter-hide-users=true

```

域账户用“你的域用户”或“你的域用户@你的域” 格式来登录 Ubuntu 桌面。


26、 为使用 Samba AD 账户的简称格式，编辑 `/etc/sssd/sssd.conf` 文件，在 `[sssd]` 块加入如下几行命令。



```
full_name_format = %1$s

```

并重启 SSSD 守护进程应用改变。



```
$ sudo systemctl restart sssd

```

你会注意到 bash 提示符会变成了没有附加域名部分的 AD 用户名。


27、 万一你因为 `sssd.conf` 里的 `enumerate=true` 参数设定而不能登录，你得用下面的命令清空 sssd 缓存数据：



```
$ rm /var/lib/sss/db/cache_tecmint.lan.ldb

```

这就是全部了！虽然这个教程主要集中于集成 Samba4 活动目录，同样的步骤也能被用于把使用 Realm 和 SSSD 服务的 Ubuntu 整合到微软 Windows 服务器活动目录。




---


作者简介：


Matei Cezar - 我是一名网瘾少年，开源和基于 linux 系统软件的粉丝，有4年经验在 linux 发行版桌面、服务器和 bash 脚本。




---


via: <https://www.tecmint.com/integrate-ubuntu-to-samba4-ad-dc-with-sssd-and-realm/>


作者：[Matei Cezar](https://www.tecmint.com/author/cezarmatei/) 译者：[XYenChi](https://github.com/XYenChi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
This tutorial will guide you on how to join an **Ubuntu Desktop** machine into a **Samba4 Active Directory** domain with **SSSD** and **Realmd** services in order to authenticate users against an Active Directory.

#### Requirements:

### Step 1: Initial Configurations

**1.** Before starting to join Ubuntu into an Active Directory make sure the hostname is properly configured. Use **hostnamectl** command to set the machine name or manually edit **/etc/hostname** file.

$ sudo hostnamectl set-hostname your_machine_short_hostname $ cat /etc/hostname $ hostnamectl

**2.** On the next step, edit machine network interface settings and add the proper IP configurations and the correct DNS IP server addresses to point to the Samba AD domain controller as illustrated in the below screenshot.

If you have configured a DHCP server at your premises to automatically assign IP settings for your LAN machines with the proper AD DNS IP addresses then you can skip this step and move forward.

![Configure Network Interface](https://www.tecmint.com/wp-content/uploads/2017/07/Configure-Network-Interface.jpg)

On the above screenshot, **192.168.1.254** and **192.168.1.253** represents the IP addresses of the Samba4 Domain Controllers.

**3.** Restart the network services to apply the changes using the GUI or from command line and issue a series of **ping command** against your domain name in order to test if DNS resolution is working as expected. Also, use **host** command to test DNS resolution.

$ sudo systemctl restart networking.service $ host your_domain.tld $ ping -c2 your_domain_name $ ping -c2 adc1 $ ping -c2 adc2

**4.** Finally, make sure that machine time is in sync with Samba4 AD. Install **ntpdate** package and sync time with the AD by issuing the below commands.

$ sudo apt-get install ntpdate $ sudo ntpdate your_domain_name

### Step 2: Install Required Packages

**5.** On this step install the necessary software and required dependencies in order to join Ubuntu into Samba4 AD DC: **Realmd** and **SSSD** services.

$ sudo apt install adcli realmd krb5-user samba-common-bin samba-libs samba-dsdb-modules sssd sssd-tools libnss-sss libpam-sss packagekit policykit-1

**6.** Enter the name of the default realm with uppercases and press **Enter** key to continue the installation.

![Set Realm Name](https://www.tecmint.com/wp-content/uploads/2017/07/Set-realm-name.png)

**7.** Next, create the **SSSD** configuration file with the following content.

$ sudo nano /etc/sssd/sssd.conf

Add following lines to **sssd.conf** file.

[nss] filter_groups = root filter_users = root reconnection_retries = 3 [pam] reconnection_retries = 3 [sssd] domains = tecmint.lan config_file_version = 2 services = nss, pam default_domain_suffix = TECMINT.LAN [domain/tecmint.lan] ad_domain = tecmint.lan krb5_realm = TECMINT.LAN realmd_tags = manages-system joined-with-samba cache_credentials = True id_provider = ad krb5_store_password_if_offline = True default_shell = /bin/bash ldap_id_mapping = True use_fully_qualified_names = True fallback_homedir = /home/%d/%u access_provider = ad auth_provider = ad chpass_provider = ad access_provider = ad ldap_schema = ad dyndns_update = true dyndns_refresh_interval = 43200 dyndns_update_ptr = true dyndns_ttl = 3600

Make sure you replace the domain name in following parameters accordingly:

domains = tecmint.lan default_domain_suffix = TECMINT.LAN [domain/tecmint.lan] ad_domain = tecmint.lan krb5_realm = TECMINT.LAN

**8.** Next, add the proper permissions for SSSD file by issuing the below command:

$ sudo chmod 700 /etc/sssd/sssd.conf

**9.** Now, open and edit **Realmd** configuration file and add the following lines.

$ sudo nano /etc/realmd.conf

**Realmd.conf** file excerpt:

[active-directory] os-name = Linux Ubuntu os-version = 17.04 [service] automatic-install = yes [users] default-home = /home/%d/%u default-shell = /bin/bash [tecmint.lan] user-principal = yes fully-qualified-names = no

**10.** The last file you need to modify belongs to Samba daemon. Open **/etc/samba/smb.conf** file for editing and add the following block of code at the beginning of the file, after the **[global]** section as illustrated on the image below.

workgroup = TECMINT client signing = yes client use spnego = yes kerberos method = secrets and keytab realm = TECMINT.LAN security = ads

![Configure Samba Server](https://www.tecmint.com/wp-content/uploads/2017/07/Configure-Samba-Server.jpg)

Make sure you replace the **domain name** value, especially the **realm value** to match your domain name and run **testparm** command in order to check if the configuration file contains no errors.

$ sudo testparm

![Test Samba Configuration](https://www.tecmint.com/wp-content/uploads/2017/07/Test-Samba-Configuration.jpg)

**11.** After you’ve made all the required changes, test Kerberos authentication using an AD administrative account and list the ticket by issuing the below commands.

$ sudo kinit[[email protected]]$ sudo klist

![Check Kerberos Authentication](https://www.tecmint.com/wp-content/uploads/2017/07/Check-Kerberos-Authentication.jpg)

### Step 3: Join Ubuntu to Samba4 Realm

**12.** To join Ubuntu machine to Samba4 Active Directory issue following series of commands as illustrated below. Use the name of an AD DC account with administrator privileges in order for the binding to realm to work as expected and replace the domain name value accordingly.

$ sudo realm discover -v DOMAIN.TLD $ sudo realm list $ sudo realm join TECMINT.LAN -U ad_admin_user -v $ sudo net ads join -k

![Join Ubuntu to Samba4 Realm](https://www.tecmint.com/wp-content/uploads/2017/07/Join-Ubuntu-to-Samba4-Realm.jpg)

![List Realm Domain Info](https://www.tecmint.com/wp-content/uploads/2017/07/List-Realm-Domain-Info.jpg)

![Add User to Realm Domain](https://www.tecmint.com/wp-content/uploads/2017/07/Add-User-to-Realm-Domain.jpg)

![List Realm Domain Info](https://www.tecmint.com/wp-content/uploads/2017/07/Add-Domain-to-Realm.jpg)

**13.** After the domain binding took place, run the below command to assure that all domain accounts are permitted to authenticate on the machine.

$ sudo realm permit --all

Subsequently, you can allow or deny access for a domain user account or a group using realm command as presented on the below examples.

$ sudo realm deny -a $ realm permit --groups ‘domain.tld\Linux Admins’ $ realm permit[[email protected]]$ realm permit DOMAIN\\User2

**14.** From a Windows machine with [RSAT tools installed](https://www.tecmint.com/manage-samba4-ad-from-windows-via-rsat/) you can open **AD UC** and navigate to **Computers** container and check if an object account with the name of your machine has been created.

![Confirm Domain Added to AD DC](https://www.tecmint.com/wp-content/uploads/2017/07/Confirm-Domain-Added.jpg)

### Step 4: Configure AD Accounts Authentication

**15.** In order to authenticate on Ubuntu machine with domain accounts you need to run **pam-auth-update** command with root privileges and enable all PAM profiles including the option to automatically create home directories for each domain account at the first login.

Check all entries by pressing **[space]** key and hit **ok** to apply configuration.

$ sudo pam-auth-update

![PAM Configuration](https://www.tecmint.com/wp-content/uploads/2017/07/PAM-Configuration.jpg)

**16.** On systems manually edit **/etc/pam.d/common-account** file and the following line in order to automatically create homes for authenticated domain users.

session required pam_mkhomedir.so skel=/etc/skel/ umask=0022

**17.** If Active Directory users can’t change their password from command line in Linux, open **/etc/pam.d/common-password** file and remove the **use_authtok** statement from password line to finally look as on the below excerpt.

password [success=1 default=ignore] pam_winbind.so try_first_pass

**18.** Finally, restart and enable Realmd and SSSD service to apply changes by issuing the below commands:

$ sudo systemctl restart realmd sssd $ sudo systemctl enable realmd sssd

**19.** In order to test if the Ubuntu machine was successfully integrated to realm run install winbind package and run **wbinfo** command to list domain accounts and groups as illustrated below.

$ sudo apt-get install winbind $ wbinfo -u $ wbinfo -g

![List Domain Accounts](https://www.tecmint.com/wp-content/uploads/2017/07/List-Domain-Accounts.jpg)

**20.** Also, check Winbind nsswitch module by issuing the **getent** command against a specific domain user or group.

$ sudo getent passwd your_domain_user $ sudo getent group ‘domain admins’

![Check Winbind Nsswitch](https://www.tecmint.com/wp-content/uploads/2017/07/check-Winbind-nsswitch.jpg)

**21.** You can also use Linux **id** command to get info about an AD account as illustrated on the below command.

$ id tecmint_user

![Check AD User Info](https://www.tecmint.com/wp-content/uploads/2017/07/Check-AD-User-Info.jpg)

**22.** To authenticate on Ubuntu host with a Samba4 AD account use the domain username parameter after **su** – command. Run **id** command to get extra info about the AD account.

$ su - your_ad_user

![AD User Authentication](https://www.tecmint.com/wp-content/uploads/2017/07/AD-User-Authentication.jpg)

Use **pwd** command to see your domain user current working directory and passwd command if you want to change password.

**23.** To use a domain account with root privileges on your Ubuntu machine, you need to add the AD username to the sudo system group by issuing the below command:

$ sudo usermod -aG sudo[[email protected]]

Login to Ubuntu with the domain account and update your system by running **apt update** command to check root privileges.

**24.** To add root privileges for a domain group, open end edit **/etc/sudoers** file using **visudo** command and add the following line as illustrated.

%domain\[[email protected]]ALL=(ALL:ALL) ALL

**25.** To use domain account authentication for Ubuntu Desktop modify **LightDM** display manager by editing **/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf** file, append the following two lines and restart lightdm service or reboot the machine apply changes.

greeter-show-manual-login=true greeter-hide-users=true

Log in to Ubuntu Desktop with a domain account using either **your_domain_username** or **your_domain_username@your_domain.tld** syntax.

**26.** To use short name format for Samba AD accounts, edit **/etc/sssd/sssd.conf** file, add the following line in **[sssd]** block as illustrated below.

full_name_format = %1$s

and restart SSSD daemon to apply changes.

$ sudo systemctl restart sssd

You will notice that the bash prompt will change to the short name of the AD user without appending the domain name counterpart.

**27.** In case you cannot login due to **enumerate=true** argument set in **sssd.conf** you must clear sssd cached database by issuing the below command:

$ rm /var/lib/sss/db/cache_tecmint.lan.ldb

That’s all! Although this guide is mainly focused on integration with a Samba4 Active Directory, the same steps can be applied in order to integrate Ubuntu with Realmd and SSSD services into a Microsoft Windows Server Active Directory.

When I try to add Ubuntu 18.4. into AD domain it says:

realm couldn’t join realm insufficient permissions to join the domainCommand Issued:

Reply`realm join --computer-ou="OU=Servers_Linux" --user=`

Hi, all in Step 3.

I got this error:

realm couldn’t change permitted logins the samba provider cannot restrict permitted loginsanyone can help me?

Replywhat about the gpo policy ? how it will apply on ubuntu domain users?

ReplyWhen I run command

`sudo testparm`

.You have idea?

ReplyHello, Thank you very much for such a good tutorial, everything went well, I could join my computer in the company AD, but in step # 20 I can not get any response with the

Replygetentcommand and therefore I can not log in with the users of the domain, any help here, am I stuck?I get the same error,

Replygetent passwdnot get domain user infoThank you so much for this tutorial.

I tried so many different forum to troubleshoot my problem to join my ubuntu to my AD and I always failed until I found this one.

For sure you found a new reader of your forum and I will share it with other.

Thanks again!

Replythank you very much. worked without problems.

ReplyHi,

Everything is set, I can also see all users when I type:

However, when I try to login, it only authenticates via

pam_unix; pam_sssauthentication is not at all checked.How can I fix that? SSSD is enabled and running.

ReplyRun sudo pam-auth-update ans make sure you check sss authentication method in pam modules.

Replyyes its already enabled

ReplyGood Evening,

When I restart the

sssdservice with this commandsystemctl restart sssd, i have this error.Do you have an idea of the problem please?

ReplyThanks

Excellent post!! Thank you very much!

Just a typo:

“sudo realm permit -all” should be “sudo realm permit –all” (that’s a double – instead of just one)

Also, in

Replysssd.confshouldn’t “dyndsn_refresh_interval = 43200” by “dyndns_refresh…” ?@Fex,

Thanks for pointing out those typos, corrected in the article..:)

ReplyIs it possible to change the user desktop background from the Domain Controller?

Replyif we want to set a particular image for all linux users?

All the settings for new users is in the skel dir.

Check this out

https://askubuntu.com/questions/62927/how-do-i-set-the-default-icon-set-and-wallpaper-for-new-users

Reply