How to edit /etc/passwd so root can login without password


I’m having an issue logging into my Jetson Nano DevKit. Some background on the issue, in an attempt to write into the EEPROM to update the EDID to match my display, I wrote over the wrong address and was unable to boot the Nano at all. After some digging in the forums, I found this is not an uncommon issue and followed the steps from this post :

Specifically, I did the following

  • Added lines BCFFILE="bootloader/${target_board}/cfg/board_config_p3448.xml" to file p3448-0000.conf.common
  • Added lines BOARDID=“3448”; and FAB=“000”; to file p3449-0000+p3448-0000-qspi-sd.conf
  • Ran flash script: `sudo ./ jetson-nano-devkit mmcblk0p1

I am now able to boot to a black screen and get serial communication, however since I am not able to initialize the username/login I cannot get into the Nano to update the EEPROM.

I found another post that I cannot find now that outlined some steps to resolve a similar issue, but was not successful. Those steps:

  • in nvidia/nvidia_sdk/Jetpack_4.6.4/Linux_for_Tegra/tools I ran sudo ,/l4t_create_default_user.shand saved a copy of the password it output
  • copied passwd, passwd-, group, group-, shadow, shadow-, gshadow, gshadow- from nvidia/nvidia_sdk/Jetpack_4.6.4/Linux_for_Tegra/roofts/etc to the SD card’s etc/ folder
  • mounted SD card back on the Nano, connected UART, made it to login screen but the nvidia/password did not work

I repeated the steps above, this time using sudo ./adduser rewt to try and make a new user to login with, but this also did not allow me to login, I see incorrect login.

Lastly, I tried this post’s suggestion to unlock and set a password for root, but still unable to login.

Editing those files is a bad way to add root login. Disabling this is an “Ubuntu thing”, but the tools for unlocking or locking an account are all standard.

There are other steps if you want to enable this with ssh, but first verify “sudo” is not harmed. Does this command work, or is it rejected?
sudo ls

If this works, then you should be ok.

This sets a password for root, and you can do this regardless of whether or not root is locked:
sudo passwd root
(then add the password)

This then unlocks root (notice that you want the password before you unlock it):
sudo passwd -u root

If you need other steps for dealing with root over ssh, just ask.

Closing issue, I was able to achieve what I wanted by following this post:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.