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.)

wjandrea
  • 14,236
  • 4
  • 48
  • 98
TheUser
  • 51

3 Answers3

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.

ioistired
  • 160
  • Hello. Thank you very much for the answer, and guess what? It worked! But the system continues to call without asking for the password. I created another user and I put a password on it, and as I explained before, it works, but now I'm trying to leave only the user who requests the password and delete the other. But it gives an error, saying that it is executing a 2204 process, something like that. I'm trying to fix. I will try one more time ...Another person replied saying that it is impossible, and it seems to be ... Definitely live was made just to really test. Thanks – TheUser Jun 15 '17 at 22:32
  • Hello again, your answer worked, but as I said, the User still had no password at boot. So, I created another user and entered a password, and I was able to delete the problematic user (sudo killall -u [user], sudo deluser [user]). Now I have a Live, persistent, and with password! Anyway, thanks again for trying to help – TheUser Jun 15 '17 at 23:11
  • 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 '17 at 16:23
  • Hello @sudodus I am trying to encrypt the live usb and I am not getting it, because I changed from distro to one based on ubuntu and there is no option when I add user: 'Encrypt home folder to protect sensitive data'. I have already tried the terminal using "adduser --encrypt-home [new user]" and it works, but I can still open the casper file and see everything, can you help me? – TheUser Jun 25 '17 at 02:27
  • 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 '17 at 07: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 '17 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 '17 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, https://help.ubuntu.com/community/Installation/FromUSBStick#Notes_about_speed – sudodus Jun 25 '17 at 18:40
  • @sudodus Cool, I did not know that possibility. Just now,i have just tested a friend's external hard disk and the writing speed was 25Mb / s, I'll see if I can buy it or buy a USB3 pendrive with adapter, as you mentioned. I'll see which one is most convenient for me. Thank you. – TheUser Jun 25 '17 at 18:55
  • 1
    Use the links from https://help.ubuntu.com/community/Installation/FromUSBStick#Notes_about_speed to select candidates for your fast USB3 pendrive. (I think Sandisk Extreme are good at a reasonable price, but they are getting old and might be difficult to buy.) You need no adapter, a USB3 pendrive can be plugged directly into a USB2 port. – sudodus Jun 25 '17 at 19:00
  • @sudodus Ok, this link is very useful, thank you. – TheUser Jun 25 '17 at 19:05
  • 1
    You are welcome.@TheUser, Good luck with a new USB drive and an installed system with encrypted LVM :-) – sudodus Jun 25 '17 at 19:07
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.

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • 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 '17 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 '17 at 08: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