项目作者: aad-for-linux

项目描述 :
Name Service Switch (NSS) Module for performing user lookups against the Azure Active Directory (AAD).
高级语言: C
项目地址: git://github.com/aad-for-linux/libnss-aad.git
创建时间: 2021-04-06T20:18:04Z
项目社区:https://github.com/aad-for-linux/libnss-aad

开源协议:GNU General Public License v3.0

下载


libnss-aad

GPL-3.0-or-later
GitHub Actions

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

Installation

  1. make
  2. sudo make install

Configuration

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

  1. passwd: compat aad
  2. group: compat
  3. 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:

  1. {
  2. "client": {
  3. "id": "{{client_id}}",
  4. "secret": "{{client_secret}}"
  5. },
  6. "domain": "{{domain}}",
  7. "user": {
  8. "group": "users",
  9. "shell": "/bin/bash"
  10. }
  11. }

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

Current Behavior

  1. id tux
  2. uid=1000(tux) gid=100(users) groups=100(users)
  3. getent passwd tux
  4. tux:x:1000:100::/home/tux:/bin/bash
  5. getent shadow tux
  6. tux:$2a$12$tlMH2KjgjCvd7gV0WVU4g.RxRe2vcXzmJ/WXLUQPRsE3yyjba9YCa:13571:0:99999:7:::

See also