Introduction
A live drive (and also a persistent live drive) is easy to read for everybody. So you do not really protect your data with a login password. Your data need encryption.
The following descriptions were made after I tested with Lubuntu 16.04.x 'Xenial' systems
See the following link and links from it for more details about live systems, persistent live systems and installed systems in external drives: Try Ubuntu (Kubuntu, Lubuntu, Xubuntu, ...) before installing it
I think that the following descriptions can be used with Xubuntu systems too (but the link to the testcase is made for a Lubuntu alternate iso file).
Another user with encrypted home
The quick fix is to create another user in your persistent live system. In Lubuntu (and I think also in Xubuntu) there is 'Users and Groups' in the System sub-menu. This menu entry runs the program users-admin
, which can be installed with the following command, if it is not already there in Xubuntu,
sudo apt-get install gnome-system-tools
Start 'Users and Groups', select +ADD to add a new user, tick the box to 'Encrypt home folder to protect sensitive data' and fill in 'Name' and 'Username'.
In the next window you should select a good password.
Let the system boot into the standard user (after cold boot or reboot), logout, select the new user and its password and login. Edit: This was fixed by the original poster as described in a comment by removing the live user 'xubuntu' (user #999).
After login you should save the passphrase for the encrypted home, when prompted. And take regular backups because [even with the passphrase] it is difficult to recover the data, if the system is damaged.
You may want 'full access' including running sudo from this new user. You can give such permissions by adding the username to lines in the file /etc/group
, with the username 'xubuntu' at the end of the line.
Example: assuming the new username is crypt
...
sudo:x:27:xubuntu,crypt
....
Warning: Reboot or shutdown to protect your data
If you logout from the new user with encrypted home, and login to the standard user xubuntu, you will still be able to read the files, that have been opened by the new user with encrypted home. So don't leave the computer at the login screen. Instead you should reboot or shutdown in order to protect your data.
Installed system with encrypted disk
The most reliable system is an installed system with encrypted disk, select 'Guided - use entire disk and set up encrypted LVM' in the partitioning window of the installer.
I mean installed like into an internal drive, but to an external drive, for example a fast USB 3 pendrive. An installed Ubuntu system is portable between computers, if you avoid (and need no) proprietary drivers (typically for the graphics chip or wifi chip).
It is easiest to install this system, if you remove the internal drive before doing it. This is particularly important, if your computer is running in UEFI mode.
Passphrase, password
It is important to select a good and long passphrase (to unlock the encrypted disk). This passphrase must be difficult to guess, but you must always remember it or write it on a paper and store it in a safe place, not near the drive. (Mix upper case and lower case letters and use at least one digit or other non-alphabetic character.)
Think in the same way to get a good login password for the new user in the persistent live system with encrypted home.