Putting together a list of user accounts.
I am looking to put a list of all the user accounts I have (I have over 300 users) together into a txt file for viewing along with their name on their account (its for a isp). How would i do that?
|
Some systems assign users a UID>100, others UIDs are >500, or even 1000. Look what is the lowest UID for a regular user in your system. Let say it is above 1000, like mine.
Code:
cat /etc/passwd | awk -F: '{if ($3>1000) print $0}' | grep -Ev "nfsnobody|otherunwanteduser1|otherunwanteduser2" | awk -F: '{printf "%s - real name: %s\n", $1, $5}' |
All times are GMT -5. The time now is 05:21 AM. |