Questions tagged [root]

The "root" account is the most privileged account on a Unix system.

The "root" account is the most privileged account on a Unix system. This account gives you the ability to carry out all facets of system administration, including adding accounts, changing user passwords, examining log files, installing software, etc.

When using this account it is crucial to be as careful as possible. The "root" account has no security restrictions imposed upon it. This means it is easy to perform administrative duties without hassle. However, the system assumes you know what you are doing, and will do exactly what you request -- no questions asked. Therefore it is easy, with a mistyped command, to wipe out crucial system files.

When you are signed in as, or acting as "root", the shell prompt displays '#' as the last character (if you are using bash). This is to serve as a warning to you of the absolute power of this account.

The rule of thumb is, never sign in as "root" unless absolutely necessary. While "root", type commands carefully and double-check them before pressing return. Sign off from the "root" account as soon as you have accomplished the task you signed on for. Finally, (as with any account but especially important with this one), keep the password secure!

1173 questions
125
votes
4 answers

Reserved space for root on a filesystem - why?

I understand that by default, newly created filesystems will be created with 5% of the space allocated for root. I also know you can change the defined space with: tune2fs -m 1 /dev/sdXY What I'm curious about though, is what the actual purpose for…
suitedupgeek
  • 1,353
  • 2
  • 9
  • 7
112
votes
5 answers

Why is root login via SSH so bad that everyone advises to disable it?

Everybody on the Internet advises to disable root login via SSH as it is a bad practice and a security hole in the system, but nobody explains why it is so. What is so dangerous in enabling root login (especially with disabled password login)? And…
rush
  • 27,055
  • 7
  • 87
  • 112
86
votes
3 answers

How do the internals of sudo work?

How does sudo work internally? How is it possible that it can become root without having the root password, unlike su? What syscalls, etc. are involved in the process? Is it not a gaping security hole in Linux (e.g. why couldn't I compile a…
strugee
  • 14,723
  • 17
  • 73
  • 119
84
votes
5 answers

Can I change root's email address or forward it to an external address?

I'm getting a lot of mail in my root user's mail account. This appears to be mostly reports and errors from things like cron scripts. I'm trying to work though and solve these things, possibly even have them be piped to some sort of "dashboard" -…
cwd
  • 44,479
  • 71
  • 146
  • 167
78
votes
5 answers

Becoming root from inside Vim

Sometimes I start editing configuration files in /etc using Vim, but forget to use sudo to start Vim. The inevitable result then is that after finishing my edits I encounter the dreaded notice that I don't have the permission to save the file.…
Mad Scientist
  • 1,246
  • 3
  • 12
  • 17
74
votes
4 answers

How do I run a command as the system administrator (root)

I need to run a command with administrative privileges. Someone said I should run a command as root. How do I do this?
Stefan
  • 24,830
  • 40
  • 98
  • 126
70
votes
6 answers

Why does reboot and poweroff require root privileges?

To restart or shut off Linux from the terminal, one can use reboot and poweroff, respectively. However, both of these commands require root privileges. Why is this so? What security risk is posed by not requiring this to have root privileges? The…
Rohan
  • 3,491
  • 9
  • 28
  • 45
69
votes
3 answers

Unable to delete file, even when running as root

I am in the process of migrating a machine from RHEL 4 to 5. Rather than actually do an upgrade we have created a new VM (both machines are in a cloud) and I am in the process of copying across data between the two. I have come across the following…
Rich
  • 4,439
  • 10
  • 33
  • 34
68
votes
1 answer

Why are the first 1024 ports restricted to the root user only?

This is more idle curiosity than anything else. A friend of mine asked me 'which port range is it that only root can use under Linux?' I told him 0-1024 were restricted. Then he asked my why it was so and... I was at a loss. No idea whatsoever. Is…
Andrew Lambert
  • 2,358
  • 1
  • 16
  • 17
63
votes
12 answers

Non-Root Package Managers

From my research, I seem to notice that all package managers insist on being used as a privileged user and must be installed into /. Typically, what I like to do is create a throwaway account, compile some software, and install to $HOME for that…
elmt
  • 732
  • 1
  • 6
  • 6
57
votes
4 answers

How to change permissions from root user to all users?

I created a folder on the command line as the root user. Now I want to edit it and its contents in GUI mode. How do I change the permissions on it to allow me to do this?
tjons
  • 709
  • 1
  • 6
  • 6
55
votes
2 answers

Origin of 'root' account

What's the origin of root account? Where did it come from and why is it called root anyway? (Originally asked by @lizztheblizz on Twitter.)
Radim
  • 653
  • 5
  • 5
51
votes
4 answers

How do I find out if I am sudoer?

How does Linux system behave when I am not sudoer? Here is what happens if I try to use sudo: server:/tmp>$ sudo cal [sudo] password for user: Sorry, try again. Is it possible that I just don't know my password or does this mean that I am not…
Rasto
  • 689
  • 2
  • 6
  • 8
50
votes
3 answers

How do you change the root password on Debian?

I want to change the password I assigned to root on my Debian webserver to something longer and more secure. How do I do that? I haven’t forgotten/lost the current password, I just want to change it.
Paul D. Waite
  • 3,527
  • 5
  • 21
  • 21
47
votes
4 answers

Why cannot find read /run/user/1000/gvfs even though it is running as root?

Can someone tell me what I'm doing wrong, what this is, or how to fix it? I'm running Fedora 18 and getting the error shown [root@servername /]# find . -name ngirc find: `./run/user/1000/gvfs': Permission denied [root@servername /]# [root@thinktank…
kal
  • 611
  • 1
  • 5
  • 7
1
2 3
78 79