140 likes | 258 Vues
NIS (Network Information Service) is essential for maintaining consistent user configurations across multiple machines in a network. It allows users to log in from any workstation with the same credentials, alleviating issues that arise from password changes and differing configurations. Centralized management streamlines the configuration of users, passwords, groups, and other critical parameters. With proper setup, NIS enhances network efficiency and security by centralizing data and allowing for redundancy. Understanding NIS is key to effective network administration.
E N D
NIS Consistent configuration across the network
Why NIS? • Primary reason is to provide same user configuration across the network • Users go any machine and log in with the same password • NOT a means of mounting files… that is NFS
Problem Workstation User changes Password Workstation Workstation
Problem Workstation User tries to login w/new password Workstation FAILURE! Workstation
Solution: Centralized management Workstation User changes Password Stored on server NIS Server Workstation Workstation
Solution: Centralized management Workstation Ask server User tries to login w/new password NIS Server Workstation Login succeeds Workstation SUCCESS!
OK, but is that all? • NO. It’s just the most important function. • More generally it allows centralization of many configuration parameters. • Providing a server allows for storing the info in a single place w/ single copy. • Must tell server what to share • Must tell clients what to ask • Understanding NIS requires knowing what it handles and what it doesn’t handle!
Who Can See It? • Originally on a network segment • Typically local • Servers can be hard-coded or broadcast • Security issues for • Broadcasting • Passwords for logging in • Used by machines in the NIS domain • Not the same as a DNS domain but could have the same name
What else does it handle? • Users, passwords,groups • Mail aliases • Host name/ip mapping like dns • Boot parameters • Printer definitions • And others • You can pick and choose which to provide
How are these functions similar? encrypted password user hostname ip address Both are simply mapping functions!
Main Components • A server and its configuration • ypserv • yp.conf • Client configuration • ypbind • nsswitch.conf • Rpc portmapper running • A domain defined • Database files • Option slave servers for redundancy
Setting up the server • Make sure “rpc” is running ypserv (likely) • rpcinfo -u localhost ypserv • It will report versions running • Generate the database files • /usr/lib/yp/ypinit -m • Update as necessary by • Changing files • In /var/yp, run “make” • If using network passwords, run rpc.yppasswd
Generating database files • Can be tricky • Each separate function should be addressed as the nuances are different. • E.g. “dns’ function is used for NIS domain but regular DNS must be available for the outside world • E.g. “password”s can be served some locally and some centrally
Setting up the client • Define the location of server in /etc/yp.conf • Use “domainname” to set machine domain • Same as in server • Run rpcinfo -p localhost looking for ypbind and portmapper • Create /var/yp directory if necessary • Modify nsswitch.conf to use the nis service