CyberNinjas / libnss_aad

Name Service Switch (NSS) Module for performing user lookups against the Azure Active Directory (AAD).
GNU General Public License v3.0
12 stars 6 forks source link

Backport to Amazon Linux (AMI) 2018.03 #9

Closed Jnchi closed 5 years ago

Jnchi commented 5 years ago

https://aws.amazon.com/amazon-linux-ami

See also: https://github.com/CyberNinjas/pam_aad/issues/30

neverrend commented 5 years ago
#!/usr/env/bash                                        

# Install dependencies                                 
yum install -y libcurl \                               
                jansson \                              
                libuuid \                              
                openssl                                

# Adds lib paths to ldconfig                           
echo "/usr/local/lib" > /etc/ld.so.conf.d/local.conf   
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local.conf

# Unpacks compiled objects                             
tar xf internal_pam-nss_package.tar.gz                 

# Copy unpacked folders into their proper homes        
cp lib64/libnss_aad.so.2 /lib64/                       
cp -f etc/*.conf /etc                                  
cp etc/profile.d/* /etc/profile.d/                     
cp -f etc/ssh/* /etc/ssh/                              
cp lib64/libnss_aad.so.2 /lib64/                       
cp lib64/security/* /lib64/security/                   
cp usr/local/lib/* /usr/local/lib/                     
cp usr/local/lib64/* /usr/local/lib64/                 

ldconfig                                               
neverrend commented 5 years ago
ldconfig: /usr/local/lib/libsodium.so.23 is not a symbolic link
ldconfig: /usr/local/lib/libjwt.so.0 is not a symbolic link
ldconfig: /usr/local/lib64/libcjson.so.1 is not a symbolic link
neverrend commented 5 years ago
bash-4.2# ls -la /usr/local/lib
total 5572
drwxr-xr-x 1 root root    4096 Apr 18 20:20 .
drwxr-xr-x 1 root root    4096 Apr  9 19:57 ..
-rw-r--r-- 1 root root  132950 Apr 18 20:17 libjwt.a
-rwxr-xr-x 1 root root     935 Apr 18 20:17 libjwt.la
lrwxrwxrwx 1 root root      15 Apr 18 20:17 libjwt.so -> libjwt.so.0.5.1
lrwxrwxrwx 1 root root      15 Apr 18 20:17 libjwt.so.0 -> libjwt.so.0.5.1
-rwxr-xr-x 1 root root   95608 Apr 18 20:17 libjwt.so.0.5.1
lrwxrwxrwx 1 root root      30 Apr 18 20:18 libsds.so -> /usr/local/lib/libsds.so.2.0.0
lrwxrwxrwx 1 root root      30 Apr 18 20:18 libsds.so.2 -> /usr/local/lib/libsds.so.2.0.0
-rwxr-xr-x 1 root root   26688 Apr 18 20:18 libsds.so.2.0.0
-rw-r--r-- 1 root root 3333696 Apr 18 20:20 libsodium.a
-rwxr-xr-x 1 root root     944 Apr 18 20:20 libsodium.la
lrwxrwxrwx 1 root root      19 Apr 18 20:20 libsodium.so -> libsodium.so.23.2.0
lrwxrwxrwx 1 root root      19 Apr 18 20:20 libsodium.so.23 -> libsodium.so.23.2.0
-rwxr-xr-x 1 root root 2088800 Apr 18 20:20 libsodium.so.23.2.0
drwxr-xr-x 1 root root    4096 Apr 18 20:20 pkgconfig