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 ...
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/...
50
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 ...
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 ...
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 ...
35
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 ...
22
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 ...
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 ...
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 ...
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-&...
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
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
...
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., ...
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 ...
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. ...
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 >&...
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&...
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 ...
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 ...
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 ...
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....
6
votes
chown is not changing symbolic link
simply.
chown -h myuser:mygroup <symlink> [without trailing slash]
should be enough and work!
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 ...
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 ...
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.
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 ...
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 ...
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 ...
5
votes
chmodding files with an SELinux security context / ACL
ACLs and SELinux contexts are entirely different.
There's a good tutorial here for CentOS
To see if SELinux is actually what is blocking your access use sestatus
$ sestatus
SELinux status: ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
root × 617linux × 296
sudo × 94
ubuntu × 93
permissions × 75
ssh × 62
macos × 51
passwords × 42
debian × 38
bash × 31
security × 26
su × 25
unix × 21
centos × 21
login × 20
user × 20
fedora × 17
user-accounts × 17
administrator × 17
installation × 15
android × 15
terminal × 14
privileges × 14
mount × 13
shell × 12