Urgent help!! Deleted my password but they still asked for my old password. Old password doesn't wor...

Need urgent help! I deleted the password using this command :

sudo passwd -d `gan`

but it still requested for my old password and when I entered my old password, it says incorrect.

I can’t enter root anymore.

gan@gan-desktop:~$ sudo -s
[sudo] password for gan: 
Sorry, try again.
[sudo] password for gan: 
Sorry, try again.
[sudo] password for gan:

What do I do :(

Hi UAVstreaming,

Try setup password back? Then you can root device.

$ passwd

Why you need deleted the password?

I will try that! Thanks Carolyuu:)

I deleted the password because I wanted to run a crontab command upon boot up. But it wasn’t working and I thought it was because of the password required for root

If you run a script from the normal boot init, then it runs as root anyway. Deleting a password disables access rather than making it non-password login.

If you save your SD card and flash a new card, and then add a password back in (and any other account password/name changes), then with sudo you could copy the following files from the “/etc” directory of one SD onto the other:


The copy would have to be from another Linux system with SD card access.

Hi UAVstreaming,

If you want to login automatic, we have a script to bypass the account setting.
You can login UART and Display automatically, please Topic-1054926.

Thanks carol,

The passwd command helped me get back my sudo password. :)

I met a similar problem.
I want to login automatic, so I used the command too:

sudo passwd -d username

the problem is that I can’t enter with my old password too ,and there is somre diffrent situation that I use the GUI and don’t know how to convert it into the command interface.

Can somebody helep me? TAT

Well , I have solved this problem.