How To Install nss_wrapper on CentOS 8
Introduction
In this tutorial we learn how to install nss_wrapper
on CentOS 8.
What is nss_wrapper
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. nss_wrapper 1.1.5 3.el8 x86_64 43 k nss_wrapper-1.1.5-3.el8.src.rpm appstream A wrapper for the user, group and hosts NSS API https BSD 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
or dnf
to install nss_wrapper
on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install nss_wrapper.
Install nss_wrapper on CentOS 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install nss_wrapper
using dnf
by running the following command:
sudo dnf -y install nss_wrapper
Install nss_wrapper on CentOS 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install nss_wrapper
using yum
by running the following command:
sudo yum -y install nss_wrapper
How To Uninstall nss_wrapper on CentOS 8
To uninstall only the nss_wrapper
package we can use the following command:
sudo dnf remove nss_wrapper
nss_wrapper Package Contents on CentOS 8
/usr/bin/nss_wrapper.pl
/usr/lib/.build-id
/usr/lib/.build-id/cc
/usr/lib/.build-id/cc/53c51a3232d4a83834ce94fee6a40205d1a22c
/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.2.5
/usr/lib64/pkgconfig/nss_wrapper.pc
/usr/share/doc/nss_wrapper
/usr/share/doc/nss_wrapper/AUTHORS
/usr/share/doc/nss_wrapper/ChangeLog
/usr/share/doc/nss_wrapper/README
/usr/share/licenses/nss_wrapper
/usr/share/licenses/nss_wrapper/LICENSE
/usr/share/man/man1/nss_wrapper.1.gz
/usr/bin/nss_wrapper.pl
/usr/lib/.build-id
/usr/lib/.build-id/fd
/usr/lib/.build-id/fd/a2309919f390fa2ecf25e2378f70d3a733716c
/usr/lib/cmake/nss_wrapper
/usr/lib/cmake/nss_wrapper/nss_wrapper-config-version.cmake
/usr/lib/cmake/nss_wrapper/nss_wrapper-config.cmake
/usr/lib/libnss_wrapper.so
/usr/lib/libnss_wrapper.so.0
/usr/lib/libnss_wrapper.so.0.2.5
/usr/lib/pkgconfig/nss_wrapper.pc
/usr/share/doc/nss_wrapper
/usr/share/doc/nss_wrapper/AUTHORS
/usr/share/doc/nss_wrapper/ChangeLog
/usr/share/doc/nss_wrapper/README
/usr/share/licenses/nss_wrapper
/usr/share/licenses/nss_wrapper/LICENSE
/usr/share/man/man1/nss_wrapper.1.gz
References
- [nss_wrapper website](https://cwrap.org/ https://cwrap.org/)
Summary
In this tutorial we learn how to install nss_wrapper
on CentOS 8 using yum and dnf.