I just bought a new laptop with ubuntu installed on it. When i first turned on the laptop ubuntu started with an error and restarted. Then when it turned on again i only had the guest session option. I've tried, but i can't use sudo in the terminal: Sudo: unable to change to root gid: operation not permitted Sudo: unable to initialize policy plugin I tried the recovery path too, but i don't have a username and can't do anything. I can only go in guest session. Please help, sorry if this is something obvious to do, it's my first time opening ubuntu.
Asked
Active
Viewed 555 times
1
-
Possible duplicate of how to reset a lost admin password? – user68186 Feb 15 '18 at 15:01
-
1@user68186 I don't believe the questions are duplicates (They may be similar). According to the OP, in this case, the user isn't created. – Dan Feb 15 '18 at 15:10
-
@Dan retracted. I am keeping the comment in case it helps others. – user68186 Feb 15 '18 at 15:42
1 Answers
1
reset root password :
While boot press shift and choose recovery mode :
drop to root shell then use following commands :
mount -o rw,remount /
passwd root
to add new user use :
adduser username
and choose a password for the user
finally:
reboot

An0n
- 2,119