Azure / Azure/azure-linux-extensions

AADLoginForLinux extension doesn't create aad pam config files

Open
#1,295 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
333
Forks
278
Avg merge
2d 9h
Merged PRs (30d)
4

Description

I've RHEL7 custom image (hardened as per Company Security Standards). I did follow AADLoginForLinux
extension documentation here https://docs.microsoft.com/en-us/azure/virtual-machines/linux/login-using-aad & RHEL7 is one of the few supported operating systems.

```
[root@localhost pam.d]# cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.9 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.9 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.9:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.9
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.9"

```
when I install the AADLoginForLinux extension, for some reason, I don't see **system-auth-aad** and **password-auth-aad** files being created in **/etc/pam.d** directory.

```
[root@rhel7-cli ~]# ls -lart /etc/pam.d/
total 136
lrwxrwxrwx. 1 root root 14 Apr 30 2020 system-auth -> system-auth-ac
-rw-r--r--. 1 root root 330 Apr 30 2020 postlogin-ac
lrwxrwxrwx. 1 root root 12 Apr 30 2020 postlogin -> postlogin-ac
lrwxrwxrwx. 1 root root 16 Apr 30 2020 password-auth -> password-auth-ac
lrwxrwxrwx. 1 root root 19 Apr 30 2020 fingerprint-auth -> fingerprint-auth-ac
lrwxrwxrwx. 1 root root 17 Apr 30 2020 smartcard-auth -> smartcard-auth-ac
-rw-r--r--. 1 root root 721 Jun 3 2020 cockpit
-rw-r--r--. 1 root root 702 Nov 16 12:20 fingerprint-auth-ac
-rw-r--r--. 1 root root 1033 Nov 16 12:20 password-auth-ac
-rw-r--r--. 1 root root 1031 Nov 16 12:20 system-auth-ac
-rw-r--r--. 1 root root 752 Nov 16 12:20 smartcard-auth-ac
-rw-r--r--. 1 root root 550 Dec 9 09:10 omi
drwxr-xr-x. 2 root root 4096 Dec 9 09:10 .
drwxr-xr-x. 117 root root 8192 Feb 1 10:17 ..
```

However, when I install the extension on marketplace RHEL7 image, I see both the files in /etc/pam.d directory and having symlinks to **system-auth** and **password-auth** in the same directory.

```
[root@localhost pam.d]# ls -lart
total 124
-rw-r--r--. 1 root root 1033 Dec 16 16:49 password-auth-ac
-rw-r--r--. 1 root root 702 Dec 16 16:49 fingerprint-auth-ac
lrwxrwxrwx. 1 root root 19 Dec 16 16:49 fingerprint-auth -> fingerprint-auth-ac
-rw-r--r--. 1 root root 752 Dec 16 16:49 smartcard-auth-ac
lrwxrwxrwx. 1 root root 17 Dec 16 16:49 smartcard-auth -> smartcard-auth-ac
-rw-r--r--. 1 root root 178 Jan 21 11:57 sudo-i
-rw-r--r--. 1 root root 200 Jan 21 11:57 sudo
-rw-r--r-- 1 root root 1150 Feb 2 09:46 system-auth-aad
-rw-r--r-- 1 root root 1148 Feb 2 09:47 password-auth-aad
lrwxrwxrwx 1 root root 26 Feb 2 09:47 system-auth -> /etc/pam.d/system-auth-aad
lrwxrwxrwx 1 root root 28 Feb 2 09:47 password-auth -> /etc/pam.d/password-auth-aad
drwxr-xr-x. 2 root root 4096 Feb 2 09:47 .
drwxr-xr-x. 87 azureuser azureuser 12288 Feb 2 11:28 ..
```

I did lot of triage why these files are not created when the installation of extension is successful. Also, the installer script in **/var/lib/waagent** doesn't have much information regarding this.

Could you please let us know on what condition, the extension skips the file creation?

Shall you need more details, please do revert to me.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.