Skip to content

Name Service Switch (NSS) Module for performing user lookups against the Azure Active Directory (AAD).

License

Notifications You must be signed in to change notification settings

outzhu/libnss-aad

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libnss-aad

GPL-3.0-or-later

Name Service Switch (NSS) Module for performing user lookups against the Azure Active Directory (AAD).

Installation

make
sudo make install

Configuration

Edit /etc/nsswitch.conf to match the following:

passwd:         compat aad
group:          compat
shadow:         compat aad

Note: The contents of /etc/nsswitch.conf differ between distributions. However, simply ensuring that aad is present on the passwd, group, and shadow lines is sufficient.

Configuration File

Create the file /etc/libnss-aad.conf and fill it with:

{
  "client": {
    "id": "{{client_id}}",
    "secret": "{{client_secret}}"
  },
  "domain": "{{domain}}",
  "user": {
    "group": "users",
    "shell": "/bin/bash"
  }
}

NOTE: For now, client.secret must be URL-encoded.

Current Behavior

id tux
uid=1000(tux) gid=100(users) groups=100(users)

getent passwd tux
tux:x:1000:100::/home/tux:/bin/bash

getent shadow tux
tux:$2a$12$tlMH2KjgjCvd7gV0WVU4g.RxRe2vcXzmJ/WXLUQPRsE3yyjba9YCa:13571:0:99999:7:::

See also

About

Name Service Switch (NSS) Module for performing user lookups against the Azure Active Directory (AAD).

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 93.5%
  • Makefile 6.3%
  • Shell 0.2%