OS.js Manual

PAM Authenticator

Log in via the system authentication system. This is only available for Linux and Node.

NOTE: Remember to restart the server to reload configuration changes.

Also set up the System storage module for this to work as intended.


In your OS.js installation directory:

$ npm install --no-save userid authenticate-pam nan@1.1.0

You'll need the development library for libpam if you're on Ubuntu or similar:

$ sudo apt-get install libpam-1g-dev


# Set up groups
$ mkdir /etc/osjs
$ edit /etc/osjs/groups.json

# Set up package blacklist (optional)
$ edit /etc/osjs/blacklist.json

# Change the configured authenticator (or use "shadow" here)
$ node osjs config:set --name=authenticator --value=pam

# Make OS.js reload after you log out
$ node osjs config:set --name=client.ReloadOnShutdown --value=true

# Update configuration and template files
$ node osjs build:config

By default, this module expects you to store the data in /etc/osjs, but you can modify this (see server.modules.* tree for settings).

To set up a user, use the useradd system command.


This is an example file for groups.json

  "anders": ["admin"],
  "guest": ["api", "application", "upload", "fs"],
  "marcello": ["api", "application", "curl", "upload", "fs"]


This is an example file for blacklist.json

  "anders": ["default/ApplicationDraw"]