Score:0

Ubuntu User has Sudo/Root Access

ng flag

I have a user called Ubuntu which has root/sudo access after removing the user Ubuntu from group sudo.

sudo deluser ubuntu sudo

Groups Ubuntu user is currently in:

../html/ $ groups
ubuntu adm dialout cdrom floppy audio dip video plugdev netdev lxd

inside /etc/passwd

ubuntu:x:1000:1000:Ubuntu:/home/ubuntu:/bin/bash

using sudo -l

../html/ $ sudo -l
Matching Defaults entries for ubuntu:
    env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin

User ubuntu may run the following commands:
    (ALL) NOPASSWD: ALL
    (ALL) NOPASSWD: ALL
    (ALL) NOPASSWD: ALL
    (ALL) NOPASSWD: ALL
    (ALL) NOPASSWD: ALL
    (ALL) NOPASSWD: ALL

I'm new to Linux administration and would like to know why this user is able to access sudo / root without using root password?

user535733 avatar
cn flag
The 'ubuntu' account is necessary in cloud images and Ubuntu Base and containers and other copied (not installed) types of Ubuntu instances -- you need an account for the first login. Best practice is to use the 'ubuntu' account to set up your own secure, key-protected admin account, test your key access and your admin powers, then delete the 'ubuntu' account entirely.
waltinator avatar
it flag
You do understand that the Ubuntu system disallows `root` login. If you don't have a `sudo`-capable userid, you won't be able to manage your system.
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.