Admin-Ahead Community

Linux => Server Security & Hardening => Topic started by: Jithin on November 29, 2013, 10:06:30 pm

Title: Check for user accounts with UID 0
Post by: Jithin 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!