我想知道默认情况下哪些组是简单(非管理员)用户的成员。
然后我将像这样编写用户组成员船脚本:
for group in $simpleUserGroups
do
groups $userName | grep -q $group || $sudo adduser $userName $group
done
所以我去了 KUbuntu 20.04.3 LTS 的 GUI,kcmshell5 user_manager
在填写字段(名称、密码等)后管理用户(),当我点击Apply
什么也没发生(系统应该打开一个弹出窗口提示管理员密码):请参阅启动板错误 #1883357。
当我检查用户是否已创建时,我得到:
$ id testUser
id: ‘testUser’: no such user
EDIT0:您可以通过执行以下操作每次重现此错误:
$ 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
然后单击“应用”,您会注意到没有弹出 sudo 密码窗口。
默认情况下,非管理员用户在 KUbuntu 上属于哪些组?
我刚刚通过名为
fips
. 让我们看看用户fips
必须提供什么:等效的 cli 命令是
默认情况下不添加其他组。