Skip to content

Commit 42a98b5

Browse files
Merge pull request #233818 from msaenzbosupport/patch-11
[Doc-A-Thon] Updating command and code block
2 parents 76d3e64 + c3c2288 commit 42a98b5

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

articles/active-directory-domain-services/ad-auth-no-join-linux-vm.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Currently Linux distribution can work as member of Active Directory domains, whi
2222
To complete the authentication flow we assume, you already have:
2323

2424
* An Active Directory Domain Services already configured.
25-
* A Linux VM (for the test we use CentosOS based machine).
25+
* A Linux VM (**for the test we use CentosOS based machine**).
2626
* A network infrastructure that allows communication between Active Directory and the Linux VM.
2727
* A dedicated User Account for read AD objects.
2828
* The Linux VM need to have these packages installed:
@@ -63,21 +63,21 @@ Review the information that you provided, and if everything is correct, click Fi
6363
6464
On your Linux VM, install the following packages: *sssd sssd-tools sssd-ldap openldap-client*:
6565

66-
```console
67-
yum install -y sssd sssd-tools sssd-ldap openldap-clients
66+
```bash
67+
sudo dnf install -y sssd sssd-tools sssd-ldap openldap-clients
6868
```
6969

7070
After the installation check if LDAP search works. In order to check it try an LDAP search following the example below:
7171

72-
```console
73-
ldapsearch -H ldaps://contoso.com -x \
72+
```bash
73+
sudo ldapsearch -H ldaps://contoso.com -x \
7474
-D CN=ReadOnlyUser,CN=Users,DC=contoso,DC=com -w Read0nlyuserpassword \
7575
-b CN=Users,DC=contoso,DC=com
7676
```
7777

7878
If the LDAP query works fine, you will obtain an output with some information like follow:
7979

80-
```console
80+
```config
8181
extended LDIF
8282
8383
LDAPv3
@@ -113,7 +113,7 @@ dSCorePropagationData: 16010101000000.0Z
113113
> [!NOTE]
114114
> If your get and error run the following command:
115115
>
116-
> ldapsearch -H ldaps://contoso.com -x \
116+
> sudo ldapsearch -H ldaps://contoso.com -x \
117117
> -D CN=ReadOnlyUser,CN=Users,DC=contoso,DC=com -w Read0nlyuserpassword \
118118
> -b CN=Users,DC=contoso,DC=com -d 3
119119
>
@@ -125,13 +125,13 @@ Create */etc/sssd/sssd.conf* with a content like the following. Remember to upda
125125

126126
Command for file creation:
127127

128-
```console
129-
vi /etc/sssd/sssd.conf
128+
```bash
129+
sudo vi /etc/sssd/sssd.conf
130130
```
131131

132132
Example sssd.conf:
133133

134-
```bash
134+
```config
135135
[sssd]
136136
config_file_version = 2
137137
domains = default
@@ -184,14 +184,14 @@ Save the file with *ESC + wq!* command.
184184

185185
Set the permission to sssd.conf to 600 with the following command:
186186

187-
```console
188-
chmod 600 /etc/sssd/sssd.conf
187+
```bash
188+
sudo chmod 600 /etc/sssd/sssd.conf
189189
```
190190

191191
After that create an obfuscated password for the Bind DN account. You must insert the Domain password for ReadOnlyUser:
192192

193-
```console
194-
sss_obfuscate --domain default
193+
```bash
194+
sudo sss_obfuscate --domain default
195195
```
196196

197197
The password will be placed automatically in the configuration file.
@@ -200,27 +200,27 @@ The password will be placed automatically in the configuration file.
200200

201201
Start the sssd service:
202202

203-
```console
204-
service sssd start
203+
```bash
204+
sudo systemctl start sssd
205205
```
206206

207207
Now configure the service with the *authconfig* tool:
208208

209-
```console
210-
authconfig --enablesssd --enablesssdauth --enablemkhomedir --updateall
209+
```bash
210+
sudo authconfig --enablesssd --enablesssdauth --enablemkhomedir --updateall
211211
```
212212

213213
At this point restart the service:
214214

215-
```console
216-
systemctl restart sssd
215+
```bash
216+
sudo systemctl restart sssd
217217
```
218218

219219
## Test the configuration
220220

221221
The final step is to check that the flow works properly. To check this, try logging in with one of your AD users in Active Directory. We tried with a user called *ADUser*. If the configuration is correct, you will get the following result:
222222

223-
```console
223+
```output
224224
[centosuser@centos8 ~]su - [email protected]
225225
Last login: Wed Oct 12 15:13:39 UTC 2022 on pts/0
226226
[ADUser@Centos8 ~]$ exit

0 commit comments

Comments
 (0)