2

Please understand that I am not good at English and I have recently applied for Ubuntu Desktop and I do not have much knowledge.

▼▼▼▼

I'm using Ubuntu 20.04 LTS now, and I'm trying to use Ubuntu 22.04 LTS.

I am currently using a numeric username (for example 11223344) using ssd. However, in Ubuntu 22.04.04, a numeric username is not logged in.

In Ubuntu 20.04, it was confirmed there was an improvement in systemd.

Are you not applying anymore?

###########################
Ubuntu 22.04.04 LTS
passwd ver : 1:4.8.1-2ubuntu2.2
systemd ver : systemd 249 (249.11-0ubuntu3.12)
###########################

▼ Additional information. ▼ This is a VMware environment.

  • AS-IS: Ubuntu 20.04 Desktop is deployed to users using + numeric Username.
  • TO-BE : I plan to use Ubuntu 22.04 Desktop as Username consisting of new creation + numbers only.
  • Username cannot be created additionally.
  • I have tried connecting Ubuntu 22.04 Desktop to numeric Username with VMware Horizon Client or Console UI, but it will not work.
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
7
  • 2
    Also being specific may help, are you asking about a Server install? or Desktop install, as there can be differences to what the DM (desktop login) will allow when compared to a text terminal login of Ubuntu 22.04 LTS Server. FYI: I just created a username "1234" on my oracular system here, and I could login... I'd expect the same on a Ubuntu 24.04 LTS Server install as well (desktop too, but a desktop can be more involved and you've not mentioned you're using a desktop system, so I'd check there first)...
    – guiverc
    Commented Jul 15 at 6:40
  • 2
    Please, can you say exactly what you tried to do, what you expected to happen, and what happened instead? I'm particularly puzzled about "using ssd".
    – rfm
    Commented Jul 15 at 7:04
  • 1
    1. So you upgraded from 20.04 to 22.04 and now the "numeric" user can't login anymore? Any error message? If you're logging in from a DM (do you mean SSDM by "using ssd"?), can you try from a TTY? 2. "In the past 20.04, it was confirmed that there was an improvement in systemd." Are you referencing this?
    – kos
    Commented Jul 15 at 7:06
  • 2
    Note that even if the tooling lets you do it, using a purely numeric username is generally a bad idea, because it’s very likely to be misinterpreted as a UID instead of a username. You could theoretically mitigate this by ensuring that the UID matches the username, but event hen you may still run into issues. Commented Jul 15 at 15:39
  • 2
    What @AustinHemmelgarn said. For example, if you do chown 11223344 file, the owner of the file will become the user id 11223344, not the user id of the user with the name 11223344. Which means a lot of things can break in the background. So please don't try to trick the system into accepting a numeric-only username. Commented Jul 16 at 10:36

1 Answer 1

8

Indeed, there are conventions for usernames, but they are loosely defined and differ between linux/unix operating system. https://systemd.io/USER_NAMES/ from the systemd documentation gives an overview. For Debian/Ubuntu systems:

Debian/Ubuntu based systems enforce the regular expression ^[a-z][-a-z0-9]*$, i.e. only lower case ASCII letters, digits and hyphens. As first character only lowercase ASCII letters are allowed. This regular expression is configurable by the administrator at runtime though. This rule enforces a minimum length of one character but no maximum length.

So yes, only numerical is not allowed: the username must start with one lowercase letter. It is very well possible that this rule was different on older Ubuntu versions.

3
  • The rule used to be different at least for useradd (lots of additional info in the report, including the motivation to the change in relation to systemd)
    – kos
    Commented Jul 15 at 8:07
  • systemd not liking usernames that start with a number is a well-documented story
    – bertieb
    Commented Jul 16 at 11:46
  • @vanadium - I'm suprised ubuntu is requiring IDs begin with one lower case letter. In other unix systems some years back, IDs always started with an uppercase letter. In those instances, it was critical to map the UID across many systems. In those instances if I remember, the UID was the same as the last six numeric characters of the ID. I believe there are large unix systems that require IDs to begin with an uppercase letter.
    – quill
    Commented Jul 17 at 21:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .