What are the default groups for a new standad user in Kubuntu?

I'd like to know which groups are simple (non-admin) users member of by default.

Then I will script user group member ship like this :

for group in $simpleUserGroups
do
    groups $userName | grep -q $group || $sudo adduser $userName $group
done

So I went to the GUI of KUbuntu 20.04.3 LTS where the users are managed (kcmshell5 user_manager) after filling the fields (name, password, etc...), when I click on the Apply nothing happen (the system should open a popup prompting for the admin password) : see launchpad bug #1883357.

When I check if the user as been created I get :

$ id testUser
id: ‘testUser’: no such user

EDIT0 : You can reproduce this bug every time by doing the following :

$ ssh -X remote-PC
Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-89-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

68 updates can be applied immediately.
To see these additional updates run: apt list --upgradable

Web console: https://seb-x-y-z:9090/ or https://192.168.x.Y:9090/

Last login: Sun Nov  7 16:10:48 2021 from 127.0.0.1


.cache -> /tmp/sebastien/.cache/

dim. 07 nov. 2021 16:12:19 CET

$ kcmshell5 user_manager
Warning: QT_DEVICE_PIXEL_RATIO is deprecated. Instead use:
   QT_AUTO_SCREEN_SCALE_FACTOR to enable platform plugin controlled per-screen factors.
   QT_SCREEN_SCALE_FACTORS to set per-screen factors.
   QT_SCALE_FACTOR to set the application global scale factor.
Couldn't load plugin: "The shared library was not found."
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1938, resource id: 32072962, major code: 40 (TranslateCoords), minor code: 0

And then click "Apply", you will notice the sudo password window does not popup.

What groups do non-admin users belong to by default on KUbuntu ?


Solution 1:

I just created a "Standard"-user via the GUI named fips. Let's take a look what user fips has to offer:

mook@computer:~$ su fips
Password: 
fips@computer:/home/mook$ id
uid=1001(fips) gid=1001(fips) groups=1001(fips)
fips@computer:/home/mook$ cd ~
fips@computer:~$ ls -al
total 68
drwxr-x--- 4 fips fips  4096 Nov  7 00:03 .
drwxr-xr-x 6 root root  4096 Nov  7 00:05 ..
-rw------- 1 fips fips    57 Nov  7 00:03 .bash_history
-rw-r--r-- 1 fips fips   220 Nov  6 23:53 .bash_logout
-rw-r--r-- 1 fips fips  3771 Nov  6 23:53 .bashrc
drwxr-xr-x 3 fips fips  4096 Nov  6 23:53 .config
-rw-r--r-- 1 fips fips 14720 Nov  6 23:53 .face
-rw-r--r-- 1 fips fips 14720 Nov  6 23:53 .face.icon
-rw-r--r-- 1 fips fips   274 Nov  6 23:53 .gtkrc-2.0
drwxr-xr-x 3 fips fips  4096 Nov  6 23:53 .local
-rw-r--r-- 1 fips fips   807 Nov  6 23:53 .profile

The equivalent cli-command is

sudo adduser fips

No other groups are added by default.