Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am using Ubuntu 13.04 and there are 5 users for the machine. I have the root password and I want to see the list of users and access the account through root in terminal.

How can I do this ?

share|improve this question

2 Answers 2

sudo -i will turn you into root and looking in /home/ is usually a good indication on who the system's real users are but you can do this account-wise by searching for users with uids over 1000 with:

awk -F: '$3 >= 1000 && $1 != "nobody" {print $1}' /etc/passwd

If you want all the system users, look in /etc/passwd.

share|improve this answer

You can see the usernames of the Users by using the following command

awk -F":" '{ print "Linux_name: " $1 "\t\tFull_Name: " $5 }' /etc/passwd 

If you want more details just modify the script to your needs.All the equired information are found in /etc/passwd.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.