• 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 Customize Linux Password Expiration and Complexity Requirements
  2. CentOS / RHEL : Resize (extend) non-root EXT3/4 filesystem on non-LVM device (hard disk partition)
  3. How to use the “screen” command in Linux
  4. reboot Command Examples in Linux
  5. How to Disable/Enable services in Zimbra Mail Server
  6. findmnt Command Examples in Linux
  7. iwconfig Command Examples in Linux
  8. feedreader: command not found
  9. Features of the “Btrfs” Filesystem
  10. mons: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • netselect-apt Command Examples in Linux
  • netselect-apt: command not found
  • nethogs Command Examples in Linux
  • nethogs: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright