Gaining root access

Just opened my brand new Jetson TX1. I am trying to gain root access, but the password is not “ubuntu” like the original log in is. I have been searching for the root password for the past hour, but I can’t find it anywhere. Thanks in advance.

Does sudo work with password “ubuntu”? Ubuntu distribution doesn’t have an accessible root account.

Hello!

Has anyone happened to figure this out. I need root access and as axel472 has said, it is not “ubuntu” like the original login. Thank you!

First a word of caution: The default admin name/password of “ubuntu”/“ubuntu” is known to the whole world. Anyone booting a Jetson which is not protected from behind a router or firewall will get hacked quite fast (port scanning will find the system and attempt brute force password logins to ubuntu anywhere from seconds or minutes to a few hours from startup…I’d be surprised to see such a system last 8 hours). If you know the password was intentionally changed by you and you just forgot the password steps can be done to try and keep the existing installation and go back to the default. If the password has worked in the past but suddenly stops, then you need to wipe the whole system and clean install…the best you could do is clone the partition first for forensics. The case of a fresh install not working from the start is usually because of misuse of permissions during the flash process.

For the case of a new flash not liking sudo, pay attention during flash to needing to preserve permissions during unpack of the sample rootfs and the apply_binaries.sh step…and flash again. Note that unless the sample rootfs was unpacked on a Linux native partition type permissions and ownership are incapable of being preserved (e.g., NTFS or VFAT do not understand Linux).

For the case of a suspected hack, flash again. Don’t waste your time trying to save it. Any ssh keys or credentials on such a machine should also be thrown out.

For the case of knowing you just forgot the password, decide if you have time to deal with this. Fixing this is a modification of installing from scratch, but it takes more time and preserves the existing install.

For this latter case of forgetting the password you can clone the root partition, mount it on loopback on your host, and then edit the password and group files back to the original install version (e.g., copy from sample rootfs using sudo)…which is then re-flashed to the Jetson using the “-r” option to reuse the cloned image. The relevant files would be “passwd”, “passwd-”, “group”, and “group-”.

almost afraid to say this but ubuntu does work for password when using sudo on a fresh install.

I have seen sudo fail many times due to permission faults during flash…and even from hacked accounts…but never for any other reason.

I’m having a similar problem regarding JetsonTX1.

By default,

  • Username= ubuntu
  • Password =ubuntu
  • I can SSH to the board using above credentials. But some cases sudo fails

    Example:

    tegra-ubuntu:/sys/kernal cd debug
    cd: debug: Permission denied.

    tegra-ubuntu:/sys/kernal sudo cd debug
    [sudo] password for ubuntu:
    sudo: cd: command not found

    So I can’t access to this debug folder. Anyone have an idea why this is happening?

    You could try:

    sudo su
    <give password>
    cd /sys/kernel/debug
    ...
    exit
    

    If the board was flashed it may also be possible the flash image was truncated if the host did not have enough disk space.

    It seems that the root access has not been directly given. Even thought I know the password of nvidia is navia, the password of ubuntu is ubuntu. But it actually does not work in the following scenatio. For example, while the ubuntu host machine gives the command “ssh nvidia@192.160.1.101” to TX2, it shows nvidia@tegra-ubuntu. The host machine to access to the TX2. However, some command needs root authorization. The command “sudo su” only turns nvidia@tegra-ubuntu into root@tegra-ubuntu:/home/nvidia#. However, how to directly get the root authorization such as root@tegra-ubuntu? Please give direct and explicit answer. Thanks,

    In R32.1 I think you have to set up the initial account and the default “ubuntu/ubuntu” and “nvidia/nvidia” are not automatically added. Whichever account is set up initially should work with that password for “sudo”. Or “sudo -s” for a root shell.

    Are you asking how to use root login directly over the network? If so, then this is one of the things I really hate about Ubuntu, but it is considered more secure. You might try this with the “-t” ssh option:
    [url]proper way to sudo over ssh - Stack Overflow

    Personally I set all access up for ssh keys only, and unlock the root account for ssh, but then lock it for local access. As a result I can ssh directly to any account (including root) by having the keys, but still deny root access via any regular or network login.