Linux > Server Security & Hardening

Check for user accounts with UID 0

(1/1)

Jithin:
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!

Navigation

[0] Message Index

Go to full version