我试图添加一个新的管理用户到一个系统。我尝试通过GUI,但它给出了错误代码1。
$ sudo adduser sudo
adduser: The user does not exist.
$ sudo adduser
Adding user `' ...
Adding new group `' (1001) ...
Adding new user `' (1001) with group `' ...
Creating home directory `/home/' ...
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/' ...
Removing user `' ...
Removing group `' ...
groupdel: group '' does not exist
adduser: `groupdel ' returned error code 6. Exiting.我该怎么办?
要求的产出:
$ 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编辑:我试图创建一个模板用户,然后根据它创建新用户。看这个问题。
为此,我将~/.zoom移动到/etc/skel,缩放创建了这些文件。如果我没记错的话我用的是平板电脑。
发布于 2022-02-24 19:28:51
/etc/skel/.zoom/data/中的管道破坏了adduser。根据错误消息,目录/etc/skel应该只包含目录、文件或链接,而不是其他文件系统对象。
显然,目录.zoom包含的不仅仅是配置文件。要为新用户准备zoom配置,您必须了解哪些文件包含可供每个用户使用的配置,并删除所有其他文件或对象。(我不知道zoom是否有任何有用的配置数据可以放到/etc/skel中。)
如果有疑问,递归删除/etc/skel/.zoom以使adduser再次工作。
发布于 2022-11-28 10:05:51
您可以尝试创建没有组的用户,如下所示:
sudo adduser --system将创建属于组nobody的用户。然后,如果要将创建的用户添加到组中,则可以:
sudo usermod -a -G 希望它对你也有帮助
https://askubuntu.com/questions/1394385
复制相似问题