Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Check for user accounts with UID 0  (Read 3562 times)

0 Members and 1 Guest are viewing this topic.

Jithin

  • Guest
Check for user accounts with UID 0
« on: November 29, 2013, 10:06:30 pm »
Hi Guys,

UID "0" means admin/full access to your Linux box. So you already know it is not a good idea to have account with 0 UID.

How to find out the accounts  that are having "0" UID?

Run the script given below.

awk -F: '($3 == "0") {print}' /etc/passwd

That will give you the list of user accounts with "0" UID.

Change the UID or remove the account ASAP.

Thank you for stopping by!