0

Am very new to Ubuntu and I got a machine which was used by some one before. Now I don't know how to recover login credentials.

I tried to enter to root and tried to see the user names. I used ls /home,but am not seing any users or names displayed. Anyone has any idea about this?

Seth
  • 58,122
ARP
  • 109
  • 1
  • 1
  • What do you want to do exactly?if you want to reset password of admin read http://askubuntu.com/q/24006/184942 – Registered User Jan 29 '14 at 05:59
  • Please post the output of ls /home? – landroni Jan 29 '14 at 06:01
  • 1
    Could you please add more in-detail as how you've managed to logg into the system? Also, please paste an output of /etc/passwd only if possible. – AzkerM Jan 29 '14 at 06:16
  • That system you got is 2nd hand. So the previous owner deleted his own user resulting in no users on that system. The answer is correct: just re-create a user as -root- and than make this a sudo user. – Rinzwind Jan 29 '14 at 08:11
  • I agree it's most likely the original owner deleted any previous accounts - but isn't it possible that the system has a separate /home partition that's not mounted when in recovery mode? The /etc/passwd file should confirm which. – steeldriver May 07 '14 at 12:48

2 Answers2

0

It might be easier to simply add a new user. Have you tried to do the following commands?

sudo useradd -m username
sudo passwd username

Replace username with a an account name.

The -m in the useradd adds a folder in the home directory. Maybe the last user used a location other than the home directory for users but I recommend sticking with the way it's "supposed" to be done.

nico
  • 136
  • 2
0

Please follow the post from John Smith and after that try typing the below command,

ls -al

and check and revert back with your feedback