How To Install nss_wrapper.x86_64 on Amazon Linux 2

In this tutorial we learn how to install nss_wrapper.x86_64 in Amazon Linux 2. nss_wrapper.x86_64 is A wrapper for the user, group and hosts NSS API

Introduction

In this tutorial we learn how to install nss_wrapper.x86_64 on Amazon Linux 2.

What is nss_wrapper.x86_64

There are projects which provide daemons needing to be able to create, modify and delete Unix users. Or just switch user ids to interact with the system e.g. a user space file server. To be able to test that you need the privilege to modify the passwd and groups file. With nss_wrapper it is possible to define your own passwd and groups file which will be used by software to act correctly while under test. If you have a client and server under test they normally use functions to resolve network names to addresses (dns) or vice versa. The nss_wrappers allow you to create a hosts file to setup name resolution for the addresses you use with socket_wrapper. To use it set the following environment variables LD_PRELOAD=libuid_wrapper.so NSS_WRAPPER_PASSWD=/path/to/passwd NSS_WRAPPER_GROUP=/path/to/group NSS_WRAPPER_HOSTS=/path/to/host This package doesn’t have a devel package cause this project is for development/testing.

We can use yum to install nss_wrapper.x86_64 on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install nss_wrapper.x86_64.

Install nss_wrapper.x86_64 on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install nss_wrapper.x86_64 using yum by running the following command:

sudo yum -y install nss_wrapper.x86_64

How To Uninstall nss_wrapper.x86_64 on Amazon Linux 2

To uninstall only the nss_wrapper.x86_64 package we can use the following command:

sudo yum remove nss_wrapper.x86_64

nss_wrapper.x86_64 Package Contents on Amazon Linux 2

/usr/bin/nss_wrapper.pl
/usr/lib64/cmake/nss_wrapper
/usr/lib64/cmake/nss_wrapper/nss_wrapper-config-version.cmake
/usr/lib64/cmake/nss_wrapper/nss_wrapper-config.cmake
/usr/lib64/libnss_wrapper.so
/usr/lib64/libnss_wrapper.so.0
/usr/lib64/libnss_wrapper.so.0.1.0
/usr/lib64/pkgconfig
/usr/lib64/pkgconfig/nss_wrapper.pc
/usr/share/doc/nss_wrapper-1.0.3
/usr/share/doc/nss_wrapper-1.0.3/AUTHORS
/usr/share/doc/nss_wrapper-1.0.3/COPYING
/usr/share/doc/nss_wrapper-1.0.3/ChangeLog
/usr/share/doc/nss_wrapper-1.0.3/README
/usr/share/man/man1/nss_wrapper.1.gz

References

Summary

In this tutorial we learn how to install nss_wrapper.x86_64 on Amazon Linux 2 using yum.