• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Identify NIS Authenticated Users

by admin

This post describes how to identify Network Information Service (NIS) authenticated users.

1. To obtain a complete list of all NIS users, run the ypcat passwd command For example:

[root@nisserver ~]# ypcat passwd
test2:x:504:504::/home/test2:/bin/bash
user1:x:501:501::/home/user1:/bin/bash
user2:x:502:502::/home/user2:/bin/bash
user3:x:503:503::/home/user3:/bin/bash

2. To identify whether a specific user is a NIS user, run the ypmatch [username] passwd command.

– If the given user exists within the NIS database, expect output such as the following:

[root@nisserver ~]# ypmatch user1 passwd
user1:x:501:501::/home/user1:/bin/bash

– If the user does not exist within the NIS database, expect output such as the following:

[root@nisserv ~]# ypmatch test passwd
Can't match key test in map passwd.byname. Reason: No such key in map
Note: It is recommended and common practice, to have the user root (with the numerical UID=0) always and only stored in the local files /etc/passwd and /etc/shadow. A user with the name root and/or the numerical uid=0 should never be stored in NIS.

Filed Under: CentOS/RHEL, Linux

Some more articles you might also be interested in …

  1. How to Install gulp-tslint software package in NPM Packages
  2. arduino: Arduino Studio – Integrated Development Environment for the Arduino platform
  3. How to create snapshot of LVM thin volumes using snapper command
  4. Linux Vs Windows – Why Linux Is Better For Programming & Web Dev
  5. script: command not found
  6. dunstify: command not found
  7. dolphin Command Examples in Linux
  8. How to install and configure sosreport under CentOS / RHEL
  9. How to Clone Linux disk partition over network using dd
  10. How to disable write access to USB devices using “hdparm” tool

You May Also Like

Primary Sidebar

Recent Posts

  • “aws s3 mv” Command Examples
  • “aws s3 mb” Command Examples
  • “aws s3 ls” Command Examples
  • “aws s3 cp” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright