Additional users in standalone created from template

if i create a standalone from a fedora 42 template (it doesn’t matter which one fedora-42/42-xfce/42-minimal) and i add another user, test, assign a password, and login as test, Qubes assigns user:user to all of the files and folders for user test.

❰user❙~❱✔≻ sudo useradd --groups qubes,wheel test
❰user❙~❱✔≻ sudo passwd test
New password: 
Retype new password: 
passwd: password updated successfully
❰user❙~❱✔≻ su test
Password: 
[test@usertest user]$ ls -Ahl
ls: cannot open directory '.': Permission denied
[test@usertest user]$ sudo ls -Ahl
total 76K
-rw-r--r--  1 user user   18 Nov  8  2024 .bash_logout
-rw-r--r--  1 user user  144 Nov  8  2024 .bash_profile
-rw-r--r--  1 user user  522 Nov  8  2024 .bashrc
drwx------  7 user user 4.0K Nov 27 16:52 .cache
drwxr-xr-x 11 user user 4.0K Nov 27 16:52 .config
drwxr-xr-x  4 user user 4.0K Oct 27 11:18 .local
drwxr-xr-x  4 user user 4.0K Nov 27 16:47 .mozilla
-rw-r--r--  1 user user  12K Nov 27 16:59 .xsession-errors
drwxr-xr-x  2 user user 4.0K Nov 24 22:12 Desktop
drwxr-xr-x  2 user user 4.0K Nov 24 22:12 Documents
drwxr-xr-x  2 user user 4.0K Nov 24 22:12 Downloads
drwxr-xr-x  2 user user 4.0K Nov 24 22:12 Music
drwxr-xr-x  2 user user 4.0K Nov 24 22:12 Pictures
drwxr-xr-x  2 user user 4.0K Nov 24 22:12 Public
drwx------  3 user user 4.0K Nov 27 16:43 QubesIncoming
drwxr-xr-x  2 user user 4.0K Nov 24 22:12 Templates
drwxr-xr-x  2 user user 4.0K Nov 24 22:12 Videos
[test@usertest user]$ 

is that expected behavior?

Your session is not clear enough. Where are you running ls exactly? It looks like you are running it in /home/user, not /home/test

you are right, i’m sorry for the oversight. facepalm.

i assumed that when i changed to the test user, i would automatically land in /home/test.

i assumed that when i changed to the test user, i would automatically land in /home/test.

You would, if you changed fully. su test changes your UID but preserves parts of your previous session, such as the working directory. In general you should always use one of the following instead:

su - test

(the dash creates an almost full login shell) or

sudo -u test -i
1 Like