Git Product home page Git Product logo

libnss-ato's Introduction

Build Status

libnss-ato (Name Service Switch module All-To-One)

The libnss_ato module is a set of C library extensions which allows to map every nss request for unknown user to a single predefined user.

Description

Suppose your system has only one account (apart from root and system users) named user_test:

]$ id user_test
]$ uid=1000(user_test) gid=1000 groups=1000

If you add libnss-ato to the chain of nss modules (in /etc/nsswitch.conf) you get something like:

]$ id randomname
]$ uid=1000(user_test) gid=1000 groups=1000

for every query of a random username not present in /etc/passwd.

Why?

This module can be used for pubblic workstations where you only need to verify username / password from a pam module (for example pam-krb5 for Active Directory users) and there is no need to give the user his own uid, gid or homedir.

Installation from source

From source just make and make install.

The only configuration file is /etc/libnss-ato.conf which consists of one line in the passwd format. For example:

test_user:x:1000:1000:Test User:/home/test:/bin/bash

Only the first line of the file /etc/libnss-ato.conf is parsed and the uid number (1000 in this example) must be the one of a real user in the system.

Here an example of the system file /etc/nsswitch.conf to make use of libnss-ato:

passwd:         files ato
group:          files
shadow:         files ato

If you have an nscd service running, please reload it after the changes in the file /etc/nsswitch.conf.

Installation from Debian packages

To build the Debian packages, run the following:

fakeroot debian/rules binary

This should create the correct .deb in the parent directory.

This package can then be installed as with any other package:

sudo dpkg -i <package_name>

You will then need to modify the config files, as above.

Installation from CentOS packages

To build the CentOS packages, run the following:

make rpm

This should create the correct .rpm in the parent directory.

This package can then be installed as with any other package:

sudo yum install <package_name>

You will then need to modify the config files, as above.

libnss-ato's People

Contributors

arlos avatar bossmc avatar donapieppo avatar johadalin avatar kokan avatar petrosagg avatar rkd-msw avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.