3

I attempted to change my sudo password(I removed myself from sudoers list by mistake). I tried following.

  1. In recovery mode, I dropped down to root shell. It is still asking root password. Ctrl D did not work. I went to generic e mode then.
  2. I replaced ro quite splash with rw init=/bin/bash and pressed F10 to enter in to root shell.

    root@nouser$ passwd vasu  
    bash : passwd command not found  
    root@nouser$ sudo passwd vasu  
    bash : sudo command not found  
    

I know commands like sudo and passwd are in /usr/bin. But I found /usr folder to be empty. ls /home is empty as well . But infact I have three users in home folder. I can execute passwd command in general boot. (of course, It is telling I can't do that).
Can some one tell me what could be the problem?

3

1 Answer 1

6
mount -o remount,rw /
mount /usr
/usr/bin/passwd root

reboot

where

  • you need to mount / with rw to mount /usr
  • you need /usr for passwd command.
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .