• 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 Delete unnecessary Entry in /etc/shadow

by admin

Question: How to remove all the unnecessary user entries in /etc/shadow file.

1. Create a backup copy of /etc/shadow file.

# cp -p /etc/shadow /etc/shadow.backup

2. Ensure the user is not existing anymore in /etc/password file.

# cat /etc/passwd | grep [userid]

3. Edit the /etc/shadow file, look for the line and remove the unnecessary user entry.

# vi /etc/shadow

4. Ensure the user is not existing anymore in /etc/shadow file.

# cat /etc/shadow | grep [userid]
Note: The steps above should only be used when all other efforts have failed to remove the user.

Filed Under: Linux

Some more articles you might also be interested in …

  1. dpkg: command not found
  2. How to Password Protect GRUB2 in Oracle Enterprise Linux 7
  3. –force V/s –nodeps : rpm command options to install or uninstall a package
  4. kscreen-doctor Command Examples in Linux
  5. nslookup Command Examples in Linux
  6. Linux / UNIX : How to send mails with attachments using mailx command
  7. blastp: command not found
  8. lscpu Command Examples in Linux
  9. gnome-terminal: command not found
  10. “imuxsock lost # messages from pid # due to rate-limiting” – rsyslog rate-limiting in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • raw: command not found
  • raw Command Examples in Linux
  • rankmirrors Command Examples in Linux
  • radeontop: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright