Score:5

Does user `ubuntu` exist by default on Ubuntu

ph flag

Is ubuntu user with group 1000:1000 standard on an Ubuntu distribution? We are trying to determine whether this user exists as I have seen it on some containers but not on a baremetal server one of the cloud providers provisoned.

guiverc avatar
cn flag
It'll depend on the installed system; I'd not expect a `ubuntu` user on installs I perform but your question is vague without specifics (desktop? core server? server? ie. product specifics, let alone release details that can influence effects)
ChanganAuto avatar
us flag
In some containers and some pre-made VMs yes, it does. Not on an installed system.
cocomac avatar
cn flag
BTW, Markdown won't work in titles, only in the question body (and comments and answers), so you can remove the ` marks from the title. Also, @guiverc that looks like an answer :)
waltinator avatar
it flag
Note that the UID:GID of `ubuntu` is `1000:1000`. Therefore, it was the first non-system user created on the system. On a "normal" installation, `1000:1000` is the user-specified first user, and is a member of the `sudo` group. Is `ubuntu`? I'm `1000:1000` on all my Ubuntu boxes. Read `man adduser adduser.conf`. The `ubuntu` userid was added somewhere else, not in a standard Ubuntu. `getent passwd ubuntu` to see a little more info.
user10489 avatar
in flag
The ubuntu user with uid=1000 gid=1000 exists on the live disk, but not usually in the installed system unless that is what was specified for the first account to create.
sudodus avatar
jp flag
Live and persistent live Ubuntu systems have the default user 'ubuntu' with the UID=999.
Score:9
cn flag

During the bare-metal install process, you are asked to create a user, so an "Ubuntu" user account is not necessary or desirable.

But a Cloud, Container, Pi, and Live images are pre-made -- you aren't offered the opportunity to create a user. So those images have a default "Ubuntu" user account so you can login.

The "Ubuntu" user is not required for Cloud or Container tasks. There's nothing special about the account, and it's easy enough to make real users once you have access. So some providers or end-users may delete the Ubuntu account in their own images or during provisioning. Or some admins may replace the user during their own setup.

  • For example, if you specify a user in cloud-init, that user will replace the Ubuntu user.
abligh avatar
nl flag
You could add that UID 1000 is (as far as I can tell) always either the preinstalled non-root user, or the non-root user added during installation.
user535733 avatar
cn flag
While true in most cases, @sudodus has identified a case (Live media) where the user 'Ubuntu' has UID=999 instead of UID=1000. There may be other corner cases out there. If the UID matters --like setting up remote mounts-- then double-checking the UID seems wise anyway.
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.