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

learn more… | top users | synonyms

50
votes
3answers
3k views

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 ...
40
votes
4answers
28k views

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 ...
38
votes
4answers
22k views

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?
37
votes
5answers
3k views

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 ...
34
votes
4answers
5k views

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 ...
28
votes
8answers
6k views

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, ...
23
votes
2answers
1k views

How does the power button shut the computer down without root permission?

When I try to shutdown the computer from a command line or terminal I must have root privileges: amy@amy:~$ shutdown now shutdown: Need to be root and amy@amy:~$ halt halt: Need to be root but ...
23
votes
1answer
2k views

Why can't root execute when executable bits are not set?

root user can write to a file even if its write permissions are not set. root user can read a file even if its read permissions are not set. root user can cd into a directory even if its execute ...
21
votes
1answer
3k views

How to get root inside of vi? [duplicate]

Possible Duplicate: Becoming root from inside Vim It could happen to anyone. The admin types: vi /etc/resolv.conf as a regulare user. He edits the /etc/resolv.conf file, but when he ...
20
votes
4answers
5k views

Can I launch a graphical program on another user's desktop as root?

Following are other questions which I think I need to know: From a non X Session? (meaning root isn't logged into X) If multiple people were logged in on X, could I auto-detect who was on which ...
20
votes
1answer
10k views

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 ...
19
votes
3answers
7k views

How is sudo intended to be used?

I've tried configuring sudo before, but I haven't had too much luck with it. How is it different from su -l -c "x"? It seems that via the configuration file, one can make it so a user can only have ...
18
votes
4answers
1k views

How universal is sudo?

I was writing some instructions on how to install something (TeX-related - if you don't ask, I won't ruin your day by supplying more details) and used sudo to install system-wide. Someone commented ...
18
votes
2answers
2k views

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.)
17
votes
7answers
15k views

Can root kill init process?

Can root kill init process (the process with pid 1)? What would be its consequences?
17
votes
3answers
41k views

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 ...
17
votes
3answers
1k views

Is it secure to leave a root shell running in detached screen session?

I'm curious about the security of leaving a root shell running inside a detached screen session. I typically never do this. Aside from the potential of my non-root user account being compromised ...
16
votes
4answers
24k views

Why is Debian's root shell colorless?

Are there any security concerns? What is the best way to enable it?
16
votes
3answers
41k views

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. Bit of an obvious newbie question, but how do I do that? I haven’t forgotten/lost the ...
14
votes
6answers
5k views

Can root/superuser read my read-protected files?

On shared unix hosting, if I have a file sensitive-data.txt and I issue: chmod 600 sensitive-data.txt Can root user still read my file? Specifically I'm wondering if it's safe to store my password ...
13
votes
11answers
1k views

Concern about logging in as root overrated?

For personal linux on my personal notebooks, I've usually set my environment to autologin as root even under X or lower runlevels. I've found my workflow is very pleasant and fast, without any ...
13
votes
6answers
2k views

Is there a root password on OS X and Ubuntu?

When you setup a new Ubuntu or OS X installation a user is generally created for you. On OS X it is whatever username you pick. On Ubuntu (the server version) usually the ubuntu user is created. The ...
13
votes
4answers
9k views

How do you rename root?

Not that it's a very good idea to change it, but for fun. According to this post, there are still some problems even after changing entries in /etc/passwd, /etc/shadow, and /etc/sudoers. Any ...
13
votes
3answers
6k views

How far can you go with rm -rf / as root

If you are root, and you issue rm -rf / Then how far can the command go? Can you recover data from this kind of an action? Even after the binaries are gone, would the running processes still be ...
13
votes
2answers
9k views

What is the difference between root and superuser?

Do they refer to the same thing or is root just a location in filesystem (its ultimate base) and superuser a privileged user (sort of equivalent of windows administrator account) ? Do they need the ...
12
votes
4answers
11k views

Why doesn't “sudo su” in a shell script run the rest of the script as root?

A sample script can be as below: #!/bin/bash sudo su ls /root When using ./test.sh as the normal user, instead run ls as super user and exit, it switches to root; and when I logout, it executes ls ...
12
votes
5answers
895 views

How to Determine the IP Address of who logged into Root?

There are several people with root access to a particular VM I am in charge of. I would like to find out which IP address was used to log into root.
12
votes
1answer
10k views

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 ...
11
votes
2answers
9k views

What is the difference between 'su -' and 'su root'? [duplicate]

Possible Duplicate: Why do we use su - and not just su? I understand that root doesn't have to be a superuser. But in the case that it is ... what is the difference between sudo su - and ...
11
votes
2answers
604 views

Why is root in wheel and operator? Can root being in a group ever make a difference?

I just noticed on my FreeBSD machine that root is in wheel and operator. I'm trying to think of a situation where UID 0 being in a group would have any effect on... well... anything, and I'm coming up ...
9
votes
3answers
2k views

Is it safe to close shell just by clicking “X” or using “ctrl+d”?

Is it safe to close shell just by clicking "X" or using "ctrl+d" while logged in as root with su or is it safer to close it by typing "exit"? Is there any difference (security-wise) at all or is it ...
8
votes
4answers
556 views

How do I stop the root user from deleting a file?

I'd like to know if I can prevent the root user from deleting a file. Is it possible?
8
votes
5answers
6k views

Is it possible to put root in LVM without using initrd?

I have just set up a Gentoo base system (which means I can boot and log in and do stuff with it now). My root partition is in an LVM2 virtual group (with a separated /boot partition). In order to boot ...
8
votes
2answers
326 views

How do I edit a file as root?

Are there any special considerations to editing a file as root? What is the safest way to do this?
8
votes
1answer
667 views

Lightweight virtualization on Linux with user isolation

What Linux-on-Linux virtualization technologies provide user isolation? Specifically, I want root in the virtual machine not to have any privilege on the host. This was not the case for LXC, but was ...
8
votes
1answer
913 views

Can I launch a process as root without launching root's login shell?

I tried to change the login shell. Here's what the first line of /etc/passwd looks like (on a Debian Wheezy install): rootx:0:0:root:/root:/:zsh When I try to login as root: Cannot execute zsh: ...
7
votes
7answers
254 views

Emptying a file for root user does not work [duplicate]

I use below command to empty a file > file.txt It works perfectly fine! But there are some files with root user permissions. So I tried sudo > different-file.txt and I got below verbose ...
7
votes
2answers
12k views

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 ...
7
votes
6answers
1k views

Negatives/downsides of Ubuntu's no-root sudo setup

By default, Ubuntu does not create a root account that the user can login to. Instead users use sudo when they need to perform actions that require administrative access. Obviously, the people at ...
7
votes
2answers
798 views

How to hinder root from running a script

The Glassfish application server provides scripts to administer the application server and also start and stop them and I would like to restrict the root user from running this script. The reason is ...
7
votes
3answers
12k views

How to get back sudo on Ubuntu?

I have done this: sudo chown -R myname /usr/ and now I can't use the sudo command because of this error: sudo: must be setuid root And as I read this means that the owner of this file ...
7
votes
1answer
1k views

why have programs like su access to /etc/shadow

Normally only root can access /etc/shadow. But programs like su and sudo can check passwords without running as root. So the question is: Why can these programs access /etc/shadow without privileges? ...
7
votes
2answers
4k views

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': ...
7
votes
1answer
6k views

How to run a GUI program as a different user (Debian)?

Using a terminal, I can change the running user with su and sudo — but how can I do that by clicking on an icon/shortcut on the desktop/start menu? If I have to be root to execute I will be asked ...
6
votes
7answers
2k views

Is it bad practice to set root's shell to something other than the default?

Once a friend of mine (who is an experienced Unix/Linux user) told me that setting root's shell to something other than sh (i.e bash or zsh) might create problems, because some script might assume ...
6
votes
6answers
223 views

File protection in Unix

Is there a way to protect a file in such a way that even root cannot delete it or rewrite it after creating it? I have a file which is created by root under /var/log/ and I want to restrict all users ...
6
votes
2answers
12k views

Unable to delete file, even as root

I've got a file on remote machine (saying that, cause I don't know who the heck created it), that I've to remove. user@machine:~/folder$ ls lift_proto.db.lock.db And permissions are like this: ...
6
votes
2answers
4k views

Write to a file without redirection?

I am writing a regular compiled application that needs to create a special file and write a magic cookie into it. I can’t write the file directly from the application, the system security model ...
6
votes
3answers
3k views

What does it mean to be in group 0?

Several users in a system I inherited have their group set to 0 in /etc/passwd. What does that mean? Do they essentially get full root privileges? The system is running CentOS 5, and the users ...
6
votes
3answers
425 views

Why are web servers traditionally started as superuser?

Thinking about a future web server setup, it struck me that for some reason web servers usually start as root and then drop certain rights (setuid) for the worker processes. In addition there is often ...