请理解,我的英语不好,而且我最近才申请 Ubuntu 桌面,但我没有太多的知识。
▼▼▼▼
我现在正在使用 Unutu20.04 LTS,但我正在尝试使用 22.04.04 LTS。
我目前使用 ssd 时使用的是数字用户名(例如 11223344)。但是在 Ubuntu 22.04.04 中,数字用户名无法登录。
在过去的20.04中,已确认systemd有所改进。
你不再申请了吗?
###########################
Ubuntu 22.04.04 LTS
passwd ver : 1:4.8.1-2ubuntu2.2
systemd ver : systemd 249 (249.11-0ubuntu3.12)
###########################
▼ 附加信息。 ▼ 这是一个 VMware 环境。
- 按原样:Ubuntu 20.04 桌面使用 + 数字用户名部署给用户。
- 未来:我计划使用 Ubuntu 22.04 桌面作为用户名,仅由新创建 + 数字组成。
- 无法另外创建用户名。
- 我曾尝试使用 VMware Horizon Client 或控制台 UI 将 Ubuntu 22.04 桌面连接到数字用户名,但是不起作用。
Jun 26 09:51:37 GUVM7272688 desktopWorker: pam_unix(gdm-password:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= user=ABC\7272688
Jun 26 09:51:37 GUVM7272688 desktopWorker: pam_sss(gdm-password:auth): authentication success; logname= uid=0 euid=0 tty= ruser= rhost= user=ABC\7272688
Jun 26 09:51:37 GUVM7272688 desktopWorker: gkr-pam: unable to locate daemon control file
Jun 26 09:51:37 GUVM7272688 desktopWorker: gkr-pam: stashed password to try later in open session
Jun 26 09:51:37 GUVM7272688 desktopWorker: pam_unix(gdm-password:session): session opened for user ABC\7272688(uid=1589386719) by (uid=0)
Jun 26 09:51:37 GUVM7272688 systemd-logind[976]: New session 65 of user 7272688.
Jun 26 09:51:38 GUVM7272688 systemd: pam_unix(systemd-user:session): session opened for user 7272688(uid=1589386719) by (uid=0)
Jun 26 09:51:38 GUVM7272688 systemd: pam_systemd(systemd-user:session): Failed to get user record: Invalid argument
Jun 26 09:51:38 GUVM7272688 desktopWorker: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring
Jun 26 09:51:39 GUVM7272688 desktopWorker: pam_unix(gdm-password:session): session closed for user ABC\7272688
Jun 26 09:51:39 GUVM7272688 systemd-logind[976]: Failed to restore VT, ignoring: Bad file descriptor
Jun 26 09:51:43 GUVM7272688 systemd-logind[976]: Session 65 logged out. Waiting for processes to exit.
Jun 26 09:52:04 GUVM7272688 desktopWorker: pam_unix(gdm-password:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= user=ABC\7272688
Jun 26 09:52:04 GUVM7272688 desktopWorker: pam_sss(gdm-password:auth): authentication success; logname= uid=0 euid=0 tty= ruser= rhost= user=ABC\7272688
Jun 26 09:52:04 GUVM7272688 desktopWorker: gkr-pam: unable to locate daemon control file
Jun 26 09:52:04 GUVM7272688 desktopWorker: gkr-pam: stashed password to try later in open session
Jun 26 09:52:04 GUVM7272688 desktopWorker: pam_unix(gdm-password:session): session opened for user ABC\7272688(uid=1589386719) by (uid=0)
Jun 26 09:52:04 GUVM7272688 systemd-logind[976]: New session 67 of user 7272688.
Jun 26 09:52:04 GUVM7272688 systemd: pam_unix(systemd-user:session): session opened for user 7272688(uid=1589386719) by (uid=0)
Jun 26 09:52:04 GUVM7272688 systemd: pam_systemd(systemd-user:session): Failed to get user record: Invalid argument
Jun 26 09:52:04 GUVM7272688 gnome-keyring-daemon[100217]: module_instances: assertion 'funcs != NULL && "instances"' failed
Jun 26 09:52:04 GUVM7272688 gnome-keyring-daemon[100217]: module_instances: assertion 'funcs != NULL && "instances"' failed
Jun 26 09:52:04 GUVM7272688 gnome-keyring-daemon[100217]: lookup_login_keyring: assertion 'GCK_IS_SESSION (session)' failed
Jun 26 09:52:04 GUVM7272688 gnome-keyring-daemon[100217]: create_credential: assertion 'GCK_IS_SESSION (session)' failed
Jun 26 09:52:04 GUVM7272688 gnome-keyring-daemon[100217]: egg_error_message: assertion 'error' failed
Jun 26 09:52:04 GUVM7272688 gnome-keyring-daemon[100217]: couldn't create login credential: (unknown)
Jun 26 09:52:04 GUVM7272688 desktopWorker: gkr-pam: the password for the login keyring was invalid.
Jun 26 09:52:06 GUVM7272688 desktopWorker: pam_unix(gdm-password:session): session closed for user ABC\7272688
Jun 26 09:52:06 GUVM7272688 systemd-logind[976]: Failed to restore VT, ignoring: Bad file descriptor
Jun 26 09:52:09 GUVM7272688 systemd-logind[976]: Session 67 logged out. Waiting for processes to exit.
Jun 26 09:52:09 GUVM7272688 systemd-logind[976]: Removed session 67.
Jun 26 09:52:55 GUVM7272688 desktopWorker: pam_unix(gdm-password:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= user=ABC\e195161
Jun 26 09:52:55 GUVM7272688 desktopWorker: pam_sss(gdm-password:auth): authentication success; logname= uid=0 euid=0 tty= ruser= rhost= user=ABC\e195161
Jun 26 09:52:55 GUVM7272688 desktopWorker: gkr-pam: unable to locate daemon control file
Jun 26 09:52:55 GUVM7272688 desktopWorker: gkr-pam: stashed password to try later in open session
Jun 26 09:52:55 GUVM7272688 desktopWorker: pam_unix(gdm-password:session): session opened for user ABC\e195161(uid=1589358554) by (uid=0)
Jun 26 09:52:55 GUVM7272688 systemd-logind[976]: New session 69 of user e195161.
Jun 26 09:52:56 GUVM7272688 systemd: pam_unix(systemd-user:session): session opened for user e195161(uid=1589358554) by (uid=0)
Jun 26 09:52:56 GUVM7272688 desktopWorker: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring
Jun 26 09:52:56 GUVM7272688 gnome-keyring-daemon[100940]: The SSH agent was already initialized
Jun 26 09:52:56 GUVM7272688 gnome-keyring-daemon[100940]: The Secret Service was already initialized
Jun 26 09:52:56 GUVM7272688 gnome-keyring-daemon[100940]: The PKCS#11 component was already initialized
Jun 26 09:52:57 GUVM7272688 polkitd(authority=local): Registered Authentication Agent for unix-session:69 (system bus name :1.1125 [/usr/bin/gnome-shell], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Jun 26 09:52:58 GUVM7272688 su: (to root) root on none
Jun 26 09:52:58 GUVM7272688 su: pam_unix(su-l:session): session opened for user root(uid=0) by (uid=0)
Jun 26 09:52:58 GUVM7272688 su: pam_unix(su-l:session): session closed for user root
Jun 26 09:52:59 GUVM7272688 realmd[102061]: Loaded settings from: /usr/lib/realmd/realmd-defaults.conf /usr/lib/realmd/realmd-distro.conf
Jun 26 09:52:59 GUVM7272688 realmd[102061]: holding daemon: startup
Jun 26 09:52:59 GUVM7272688 realmd[102061]: starting service
Jun 26 09:52:59 GUVM7272688 realmd[102061]: connected to bus
Jun 26 09:52:59 GUVM7272688 realmd[102061]: GLib-GIO: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
Jun 26 09:52:59 GUVM7272688 realmd[102061]: released daemon: startup
Jun 26 09:52:59 GUVM7272688 realmd[102061]: claimed name on bus: org.freedesktop.realmd
Jun 26 09:52:59 GUVM7272688 realmd[102061]: client using service: :1.1173
Jun 26 09:52:59 GUVM7272688 realmd[102061]: holding daemon: :1.1173
Jun 26 09:52:59 GUVM7272688 realmd[102061]: * No default domain received via DHCP or given by hostname
Jun 26 09:52:59 GUVM7272688 realmd[102061]: * No default domain received via DHCP or given by hostname
6
最佳答案
1
确实,用户名有约定,但它们定义不明确,并且在 linux/unix 操作系统之间有所不同。systemdhttps://systemd.io/USER_NAMES/
文档给出了概述。对于 Debian/Ubuntu 系统:
基于 Debian/Ubuntu 的系统强制使用正则表达式 ^[az][-a-z0-9]*$,即仅使用小写 ASCII 字母、数字和连字符。仅允许使用小写 ASCII 字母作为第一个字符。不过,此正则表达式可由管理员在运行时配置。此规则强制使用最小长度为一个字符,但没有最大长度。
所以是的,只允许使用数字:用户名必须以一个小写字母开头。这条规则在较旧的 Ubuntu 版本上可能有所不同。
1
-
该规则(报告中有很多附加信息,包括与此相关的变化动机
systemd
)
–
|
–
–
–
–
–
|