Score:0

adduser fails with error code 1 and then error code 6

am flag

I am trying to add a new admin user to a system. I tried via the GUI but it gave error code 1. I went to the terminal and tried:

$ sudo adduser <username> sudo
adduser: The user <username> does not exist.

$ sudo adduser <username>
Adding user `<username>' ...
Adding new group `<username>' (1001) ...
Adding new user `<username>' (1001) with group `<username>' ...
Creating home directory `/home/<username>' ...
Copying files from `/etc/skel' ...
Stopped: Cannot deal with /etc/skel/./.zoom/data/com.zoom.ipc.assistantapp__req.
It is not a dir, file, or symlink.

Removing directory `/home/<username>' ...
Removing user `<username>' ...
Removing group `<username>' ...
groupdel: group '<username>' does not exist
adduser: `groupdel <username>' returned error code 6. Exiting.

What should I do?

Requested output:

$ ls -la /etc/skel
drwxr-xr-x  28 root root  4096 Feb 17 19:57 .
drwxr-xr-x 142 root root 12288 Feb 22 15:59 ..
drwxr-xr-x  29 root root  4096 Feb 17 15:43 anaconda3
-rw-------   1 root root  1869 Feb 17 19:56 .bash_history
-rw-r--r--   1 root root   220 Feb 17 19:56 .bash_logout
-rw-r--r--   1 root root  4571 Feb 17 19:56 .bashrc
drwx------  45 root root  4096 Feb 17 15:42 .cache
drwxr-xr-x   2 root root  4096 Feb 17 15:43 .conda
-rw-r--r--   1 root root    25 Feb 17 19:56 .condarc
drwx------  22 root root  4096 Feb 17 19:56 .config
drwxr-xr-x   2 root root  4096 Feb 17 15:42 Desktop
drwxr-xr-x   2 root root  4096 Feb 17 15:42 Documents
drwxr-xr-x   2 root root  4096 Feb 17 15:42 Downloads
drwx------   3 root root  4096 Feb 17 15:42 .gnupg
drwx------   5 root root  4096 Feb 17 15:42 .local
drwx------   5 root root  4096 Feb 17 15:47 .mozilla
drwxr-xr-x   2 root root  4096 Feb 17 15:42 Music
drwxr-xr-x   3 root root  4096 Feb 17 19:57 .npm
drwx------   3 root root  4096 Feb 17 15:42 .nv
drwxr-xr-x   8 root root  4096 Feb 17 15:43 .nvm
drwxr-xr-x  12 root root  4096 Feb 17 15:47 .oh-my-zsh
drwxr-xr-x   3 root root  4096 Feb 19 09:25 Pictures
drwx------   3 root root  4096 Feb 17 15:43 .pki
-rw-r--r--   1 root root   807 Feb 17 19:56 .profile
drwxr-xr-x   2 root root  4096 Feb 17 15:42 Public
-rw-r--r--   1 root root    10 Feb 17 19:56 .shell.pre-oh-my-zsh
drwx------   2 root root  4096 Feb 17 15:42 .ssh
drwxr-xr-x   3 root root  4096 Feb 17 20:02 .steam
-rw-r--r--   1 root root  1703 Feb 17 19:56 .streamdeck_ui.json
-rw-r--r--   1 root root     0 Feb 17 19:56 .sudo_as_admin_successful
drwxr-xr-x   2 root root  4096 Feb 17 15:42 Templates
drwxr-xr-x   3 root root  4096 Feb 17 15:47 .var
drwxr-xr-x   2 root root  4096 Feb 17 15:42 Videos
drwxr-xr-x   3 root root  4096 Feb 17 15:42 .vscode
-rw-r--r--   1 root root   168 Feb 17 19:56 .wget-hsts
-rw-r--r--   1 root root  3220 Feb 17 19:56 winehq.key
-rw-r--r--   1 root root 49950 Feb 17 19:56 .zcompdump
drwx------   8 root root  4096 Feb 17 19:57 .zoom
-rw-------   1 root root  7833 Feb 17 19:56 .zsh_history
-rw-r--r--   1 root root  4672 Feb 17 19:56 .zshrc
$ sudo stat /etc/skel/./.zoom/data/com.zoom.ipc.assistantapp__req

File: /etc/skel/./.zoom/data/com.zoom.ipc.assistantapp__req
  Size: 0           Blocks: 0          IO Block: 4096   fifo
Device: 10304h/66308d   Inode: 26348057    Links: 1
Access: (0600/prw-------)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-02-17 19:57:11.314149781 -0500
Modify: 2022-02-17 19:57:11.314149781 -0500
Change: 2022-02-17 19:57:11.314149781 -0500
 Birth: 2022-02-17 19:57:11.314149781 -0500
$ sudo ls -la /etc/skel/./.zoom/data

total 80
drwx------ 3 root root  4096 Feb 17 19:57 .
drwx------ 8 root root  4096 Feb 17 19:57 ..
prw------- 1 root root     0 Feb 17 19:57 com.zoom.ipc.assistantapp__req
prw------- 1 root root     0 Feb 17 19:57 com.zoom.ipc.assistantapp__res
drwx------ 2 root root  4096 Feb 17 19:57 WaitingRoom
-rw------- 1 root root  8192 Feb 17 19:57 zoommeeting.enc.db
-rw------- 1 root root 58368 Feb 17 19:57 zoomus.enc.db

Edit: I was trying to create a template user and then make new users based off of it. See this question.

To do this I moved ~/.zoom to /etc/skel, zoom created these files. I used flatpak if I recall correctly.

N0rbert avatar
zw flag
Does this answer your question? [How do I add a user to the "sudo" group?](https://askubuntu.com/questions/2214/how-do-i-add-a-user-to-the-sudo-group)
Bodo avatar
pt flag
Please [edit] your question and show the output of `ls -la /etc/skel` and `stat /etc/skel/./.zoom/data/com.zoom.ipc.assistantapp__req` and `ls -la /etc/skel/./.zoom/data`
SumNeuron avatar
am flag
@N0rbert no, as this isn't about adding a user to the sudo group
SumNeuron avatar
am flag
@Bodo done, thank you for taking a look
David avatar
cn flag
What version of Ubuntu?
SumNeuron avatar
am flag
@David version 20.10
Bodo avatar
pt flag
The `adduser` script does not work if `/etc/skel` contains something that is not a dir, file, or symlink. In your case there are two pipes `com.zoom.ipc.assistantapp__req` and `com.zoom.ipc.assistantapp__res`. Did the installation of Zoom create the directory `/etc/skel/.zoom/` and all its contents? Or did you manually create this? How did you install Zoom? From an official package repository? From a PPA? As a SNAP package? Something else? Please add details to your question.
SumNeuron avatar
am flag
@Bodo I was following advice from [here](https://unix.stackexchange.com/questions/690638/debian-create-new-user-based-off-of-an-existing-one-copying-configs-apps/690649?noredirect=1#comment1306308_690649) and moved `.zoom` to `/etc/skel`, zoom created these files. I used flatpak if I recall correctly.
Bodo avatar
pt flag
**Please [edit] your question** to provide requested information, don't use comments for this purpose. Do I understand correct that zoom created `.zoom` in your home directory and you copied/moved this to /etc/skel? Please confirm this in your question. As far as I understand, the linked comment recommends to modify `.bashrc` or `.profile` in `/etc/skel`, not to blindly copy the `.xyz` directories of applications.
Score:2
pt flag

The pipes in /etc/skel/.zoom/data/ break adduser. According to the error message, the directory /etc/skel is supposed to contain directories, files or links only, not other file system objects.

Apparently the directory .zoom contains more than configuration files only. To prepare a configuration for zoom for new users, you have to find out what files contain configuration that can be used for every user and remove all other files or objects. (I don't know if there is any useful configuration data for zoom that could be put into /etc/skel.)

If in doubt, recursively remove /etc/skel/.zoom to make adduser working again.

Score:0
US flag

You can try creating the user with no group like below:

sudo adduser <username> --system

The user will be created belonging to the group nobody. Then, if you would like to add the user you created to a group, you can do:

sudo usermod -a -G <groupname_to_be_added_to> <username_you_created above>

Hope it helps you too :)

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.