86 votes
Accepted

Why is the most powerful user on a Unix/Linux system called “root?”

The ancient precursor to the precursor of Linux (Unix) was Multics operating system and in Multics the privileged user’s home directory was the root directory. And some super-creative type came up ...
MarianD's user avatar
  • 2,716
52 votes
Accepted

Where did the term "superuser" originate?

Where did the term "superuser" originate? su allows one to become the super--user, who has all sorts of marvelous powers. From the First Edition Unix su man page: 11/3/...
DavidPostill's user avatar
  • 157k
49 votes

How can I make my own account a sudoers on VirtualBox?

VirtualBox is TOTALLY relevant to the question. This can happen if you chose to have VirtualBox automatically create your first user for you when setting up Ubuntu. The first user is not added to ...
Retr0Rob's user avatar
  • 491
45 votes
Accepted

How to disable WSL password?

In wsl add your username to a sudo config file. Replace MY_USERNAME below to your username name. sudo nano /etc/sudoers.d/MY_USERNAME add the following line: MY_USERNAME ALL=(ALL) NOPASSWD:ALL If you ...
Chris McKee's user avatar
35 votes

Synology DSM - Can't log as root (but works with admin)

If your synology is in DSM6 and you're logged with a user part of administrator group, you can do : sudo -i enter your root/admin password or even sudo su - (it works to) now you're root tadaaa
Julien Grimal's user avatar
35 votes

Where did the term "superuser" originate?

OED (paywalled) gives the following etymology: super- prefix + user n. The earliest example that they list is from K. Thompson & D. M. Ritchie (1971): "Unix Programmer's Man.": Only the ...
Jukka Suomela's user avatar
33 votes

How to get around this error when unTarring an archive “tar: Cannot change ownership to uid 1000, gid 1000: Operation not permitted”

The problem is described here. This problem arises when trying to untar in a context where tar thinks it is root (e.g. a Docker container). The solution is to add the flag --no-same-owner: tar -zvxf ...
Jacob Stern's user avatar
21 votes
Accepted

Linux / Folder and /root folder

/ (Root directory) vs /root directory / directory called as Root Directory sits on the top of the file system hierarchy. That means it is the ultimate parent or grandparent or grand grandparent of ...
C0deDaedalus's user avatar
  • 2,600
21 votes
Accepted

How can I make my own account a sudoers on VirtualBox?

Virtualbox is irrelevant relevant - answer updated to account for VirtualBox 7 and its unattended installations. Defaults for Ubuntu are: Login to root account is disabled Members of group sudo are ...
gronostaj's user avatar
  • 57k
19 votes

apt-get update not working: Signing/ Verification errors

Solved by doing a docker system prune(?!). Is it the image that was in a bad state? Was it a problem caused by not having enough disk space? Maybe something to consider if you're having the problem ...
Pierre.Sassoulas's user avatar
19 votes

Is PermitRootLogin based on UID or user name?

I appreciate the approach of @mtak in the other answer, but the answer is obvious even without this trials. It is based on the UID, as you can see in the source code of openssh: if (authctxt->pw-&...
Jakuje's user avatar
  • 10.3k
18 votes

sudo command trying to search for hostname

Thanks to the linked bug report filed by Matthias Urlichs in another comment, the following command solved the issue for me: Defaults !fqdn Place this line in the /etc/sudoers file
kjones's user avatar
  • 285
17 votes
Accepted

Synology DSM - Can't log as root (but works with admin)

Your Synology probably upgraded to DSM6, in which security has been hardened... In DSM6 you can no longer use root for SSH, but you can use any other member account of the administrators group. Mind ...
Victor Vogelpoel's user avatar
16 votes
Accepted

Is PermitRootLogin based on UID or user name?

It seems the check is done on UID (tested on OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.1t 3 May 2016): Set PermitRootLogin off: mtak@pdv1:~$ grep PermitRootLogin /etc/ssh/sshd_config ...
mtak's user avatar
  • 16.9k
15 votes

What's default root password for docker official Centos image

To set the root password inside a Docker container: Log in as root: docker exec -ti -u root containerID /bin/bash Use the passwd command to change the password. Commit changes in Docker (i.e., ...
Darryl Blonski's user avatar
15 votes

Xubuntu 16.04 ttyname failed Inappropriate ioctl for device

The ultimate cause is that Xubuntu clearly didn't expect anyone to perform a graphical login to the root account, so its default .profile file generates a spurious error in this situation. If you ...
David C.'s user avatar
  • 1,035
11 votes
Accepted

How to open a file in ranger as root?

According to man: Flags give you a way to modify the behavior of the spawned process. They are used in the commands ":open_with" (key "r") and ":shell" (key "!"). f Fork the process. ...
Artalus's user avatar
  • 323
10 votes

Synology DSM - Can't log as root (but works with admin)

In DSM Version 6 you can still login as root when using RSA keys. Therefore just copy your public key as admin to your Synolgy: $ cat ~/.ssh/id_rsa.pub | ssh [email protected] 'umask 077; cat >&...
F.B.'s user avatar
  • 101
10 votes

AWS : How to switch as "root" user?

For Amazon Linux 2 you can use sudo su [ec2-user@ip-xxx-xxx-xxx-xxx ~]$ cat /etc/os-release NAME="Amazon Linux" VERSION="2" ID="amzn" ID_LIKE="centos rhel fedora&...
Everett Toews's user avatar
10 votes
Accepted

Is it possible to perform bind mount as a non-root user in an unshared namespace while preserving your UID and groups?

Answering my own question as I've now discovered the existence of Bubblewrap. It's used in Steam, amongst other things. It is similar to proot but seemingly without the downsides. You can use it like ...
Chewi's user avatar
  • 353
8 votes

Why is the most powerful user on a Unix/Linux system called “root?”

Some premises It is not advised (really not advised) but you can change that name. It was not always so [1] some early UNIX systems (particularly ones from CMU) called the user "avatar" - to ...
Hastur's user avatar
  • 19k
7 votes

Unable to lock the administration directory (/var/lib/dpkg/) error when trying to install unrar from the terminal in Ubuntu

Run the following command : sudo rm /var/lib/dpkg/lock Create missing folders (use the command ls -l /var/lib/dpkg/ first to display the existing folders, if somes floders exist do not re-create it ...
GAD3R's user avatar
  • 3,760
7 votes

Should I use sudo in a script or sudo an entire script?

Following the principle of least privilege, run as little as you can as root. Therefore, sudo from within the script. Note that the first time there is a command that needs sudo, you may be prompted....
TOOGAM's user avatar
  • 15.8k
6 votes

How do I make sudo ask for the root password?

A common configuration that requires the password of the target (not what we want): Defaults targetpw ALL ALL=(ALL) ALL The second line would read out loud like: "ALL users on ALL hosts can ...
Paul Parker's user avatar
6 votes
Accepted

Removing directories from PATH

In terminal, copy the results of path. echo $PATH /your/:~/path/:~/.dotnet/tools:/here/: Paste the contents of PATH into a text editor and remove the troublesome directory in the PATH from between ...
NonCreature0714's user avatar
6 votes

Root user cannot read /root/

Make sure that you have logged out and logged back in again, else the group change won't apply. Other than that, what you have written works for me.
Tim Schumacher's user avatar
5 votes

How do I run a launchd command as root

For Googlers looking to specifically run a LaunchAgent with root privileges intead of a LaunchDaemon, it can be done by: Create your LaunchAgent in ~/Library/LaunchAgents Run your application with ...
Cory Klein's user avatar
  • 1,692
5 votes

How do I make sudo ask for the root password?

I know this question is old, but it is the most concise question I've found for this use case (which is a minor percentage, true, but nonetheless legitimate and helpful in the right scenario). After ...
SRDC's user avatar
  • 168
5 votes
Accepted

macOS Sierra 10.12.2 root cannot write in /usr/sbin

This is macOS System Integrity Protection (SIP) which prevents even root from changing things in /System, /usr, /bin, /sbin and pre-installed Apps. An exception in /usr is that /usr/local can be ...
greg-449's user avatar
  • 1,155

Only top scored, non community-wiki answers of a minimum length are eligible