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 ?
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
.
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.