4

I installed Xubuntu on a pen drive to use as live (with persistence) and I cannot put a password.

It asks to enter the "current password", but I never changed any kind of password.

user settings screenshot

I've tried to leave it blank, but it will not accept that. I also tried to create another user with password, and it worked, but the system does not connect directly to it on boot. And I already tried to delete the user with no password there.

Help me?

(Sorry if there are any spelling mistakes. I used Google Translate.)

6
  • 2
    It might not be possible to change the password for a user of a live USB session of Ubuntu/Xubuntu. (If you do a full, non-"live" install to a pendrive, there should be no problem, of course.) Then again, I could be wrong! Jun 14, 2017 at 21:27
  • Missing the final closing ). On the note of changing the password, you might be able to force a password into /etc/shadow for the Live Session user, but it might not work... YMMV. An actual install would probably better, but I could be wrong. Jun 14, 2017 at 21:41
  • @NickWeinberg Thank you very much for the answer, if I can not solve it, I will try for the installation on the pen drive
    – TheUser
    Jun 14, 2017 at 22:05
  • @ben-NabiyDerush Sorry did not understand very well about etc / shadow
    – TheUser
    Jun 14, 2017 at 22:07
  • Related: Live CD asks for a username and password
    – wjandrea
    Jun 15, 2017 at 15:43

3 Answers 3

4

There is no default password for the live user. It is blank. It seems though, that the GUI app you're using doesn't let you leave the password blank.

You can change it by opening a terminal and typing

passwd

It'll also ask you for the current password. Just press enter.

12
  • 2
    Congratulations @TheUser and thanks for sharing your solution :-) Please be aware that if you want to protect your data you need encryption. Otherwise anyone can boot in live-only mode and get access to the data stored in the casper-rw file or partition.
    – sudodus
    Jun 16, 2017 at 16:23
  • 1
    @TheUser, It is tricky to make a persistent live drive and a second user with encrypted home. When writing my answer I made such a system (as described in the answer). I used Lubuntu, and it worked. Notice that you must shutdown or reboot to protect the data after you have logged in as the second user. Otherwise the data will still be readable by the standard user. But there might be problems in such a system, if you remove the standard user (of the live system). Instead I would recommend an installed system (in a USB pendrive) using LVM with encryption, 'encrypted disk'.
    – sudodus
    Jun 25, 2017 at 7:42
  • 1
    @sudodus I was already aware of having to reboot, and did everything correctly, even showing the message on "ecryptfs-unwrap-passphre", I can read the casper-rw file without problems. Never mind. Answering your other comment, i use is the Zorin operating system. I already tried installing on USB Stick, but it was with Lubuntu, but I gave up in the middle of the process because it was 30 minutes ago and the installation did not finish.
    – TheUser
    Jun 25, 2017 at 17:38
  • 1
    @sudodus My USB port is 2.0 and the write rate is only 5Mb / s, so it is not at all profitable. Many thanks for the provision, I'll stay with Live without encryption, with the password already good, I'll take the risk. Thanks for the answer.
    – TheUser
    Jun 25, 2017 at 17:38
  • 1
    @TheUser, You need not give up encryption yet :-) Write rate 5Mb/s probably means that it is limited by the flash memory hardware. A fast USB3 pendrive should make it possible to increase the speed with a factor 5, to 25MB/s via a USB 2 port. (This is what I get.) And with that speed it works fairly well to run an installed light-weight system like Lubuntu. See this link and links from it, help.ubuntu.com/community/Installation/…
    – sudodus
    Jun 25, 2017 at 18:40
1

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.

2
  • Hello. I already created another User with a password and it worked, but I wanted the system to connect directly to it on boot
    – TheUser
    Jun 15, 2017 at 22:42
  • 1
    @TheUser, I would recommend an installed system (in a USB pendrive) using LVM with encryption, 'encrypted disk'. If you tell me which flavour and version of Ubuntu you intend to use (for example Xubuntu 16.04.1 LTS, 64-bit), I can make a test installation to a USB 3 pendrive (Sandisk Extreme).
    – sudodus
    Jun 25, 2017 at 8:00
0

Just go to "Users and Groups" and create a new user. Open terminal and add to sudo group

sudo usermod -aG sudo <your-new-username>

Logout, and login as new user. Delete default user

sudo userdel xubuntu

if you get an error about process being used do

sudo kill -9 process-Number-Listed-by-error

then again sudo userdel xubuntu and finally kill home dir of default user

sudo rm -rf /home/xubuntu

Now you are running fresh user with password

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.