I recently used @Harsh 's mkusb instructions to successfully create an Ubuntu 18.04 live USB with persistence greater than 4 GB. The default user is Ubuntu and the default password is , that is to say blank (just hit enter).

Can I run the sudo passwd Ubuntu command and add an actual password to this live USB system? I want a password required on boot and on the lock screen as well. I don't know what issues this would present, if any. I do understand somebody could still mount my live USB system on another Linux machine, and have access to my files. My password requirement is a very low level of defense, that I'm comfortable with, and want.

Alternatively, could I simply delete the Ubuntu user, and add myself jason as the only user, create a password for jason, and be done with it?

  • Are this usb installation use something like squash fs for system files, or its plain ext4? Try to create new user, and check if it persist. If so, change password for Ubuntu. – LeonidMew Jan 22 at 15:58
  • 2
    You can add yourself as a new User to a persistent drive: Settings/Details/Users/ . From there add a password. – C.S.Cameron Jan 23 at 13:21
  • @C.S.Cameron I added myself as a new user and gave myself admin privileges. Is it OK to delete the original ubuntu user ID? Or is that some type of sudo ID that needs to stay? – Jason Hunter Jan 23 at 14:08
  • I don't usually bother to remove the Ubuntu user, I think it goes away by itself. – C.S.Cameron Jan 24 at 3:16

Persistent live Ubuntu

  • I tested, and yes, you can remove the original ubuntu user after creating a custom user ID with a good password and admin (sudo) permissions.

    sudo add-apt-repository universe
    sudo apt update
    sudo apt install gnome-system-tools

    and you get a convenient tool to create a custom user,


    Remember the admin (sudo) permissions!

  • It is a good idea to set the permissions of your subdirectories (in your home directory) to only allow your own user to see them. And set the permissions for the files in a corresponding way.

    find * -type d -exec chmod 700 {} \;
    find * -type f -exec chmod 600 {} \;

    Using * instead of . excludes the hidden directories and files from these actions.


Logging in live-only, 'Try Ubuntu', does not give direct access to files saved in Documents. but the default ubuntu live has sudo permissions, and can access these files that way.

ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ ls -l
total 44
drwx------ 2 1000 1000 4096 Jan 24 20:28 Desktop
drwx------ 2 1000 1000 4096 Jan 24 20:58 Documents
drwx------ 2 1000 1000 4096 Jan 24 20:28 Downloads
drwx------ 2 1000 1000 4096 Jan 24 20:28 Music
drwx------ 2 1000 1000 4096 Jan 24 20:28 Pictures
drwx------ 2 1000 1000 4096 Jan 24 20:28 Public
drwx------ 2 1000 1000 4096 Jan 24 20:28 Templates
drwx------ 2 1000 1000 4096 Jan 24 20:28 Videos
-rw------- 1 1000 1000 8980 Jan 24 20:27 examples.desktop
ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ ls -l Documents/
ls: cannot open directory 'Documents/': Permission denied
ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ sudo ls -l Documents/
total 8
-rw-r--r-- 1 1000 1000 7 Jan 24 20:54 hej
-rw-r--r-- 1 1000 1000 6 Jan 24 20:58 hi
ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ cat Documents/hi
cat: Documents/hi: Permission denied
ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ sudo cat Documents/hi

Installed Ubuntu in a USB pendrive

  • If you want security it is much better to create an installed system in your USB pendrive, installed like into an internal drive (but into a pendrive). See the instructions at the following link:

    How do I install Ubuntu to a USB key? (without using Startup Disk Creator).

  • If you wish, you can encrypt it (LVM with LUKS encryption). In that case, do it at the partitioning window during the installation.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.