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

learn more… | top users | synonyms

37
votes
4answers
17k 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?
17
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 ...
27
votes
7answers
5k 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, ...
36
votes
4answers
24k 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 ...
47
votes
3answers
2k 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 ...
14
votes
6answers
4k 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 ...
12
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 ...
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 ...
8
votes
2answers
258 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?
6
votes
3answers
2k 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 ...
19
votes
3answers
6k 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 ...
17
votes
7answers
13k views

Can root kill init process?

Can root kill init process (the process with pid 1)? What would be its consequences?
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 ...
6
votes
3answers
11k 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 ...
8
votes
1answer
634 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 ...
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 ...
4
votes
1answer
534 views

Mac OS X Darwin: how to reset admin password?

Today I bought an ibook G4 from a garage sale. The people who sold it to me didn't know the password for the 2 accounts on it. Apparently it was the guys late father's laptop. Any suggestions on how ...
2
votes
2answers
2k views

Root password not working to log in to Gnome with gdm

I have a weird issue going on. I have a user account and I can login to Gnome normally. From a terminal there I can use su root and switch to root with my root password. However, when I try to login ...
18
votes
1answer
8k 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 ...
1
vote
1answer
1k views

How to reset Linux root and grub passwords?

If we forget our Linux root password, we can change it by changing grub's boot options. But in this case, we also set a grub password and forgot both passwords. How can we recover both?
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 ...
8
votes
1answer
735 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: ...
5
votes
2answers
5k views

How do I disable remote root login via ssh?

How do I disable remote root login via ssh? I want to log into my server (I use keys on my main comp) then su into root instead of access root directly. I am using Debian. I follow guides online ...
17
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 ...
12
votes
4answers
8k 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
2answers
8k 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 ...
10
votes
1answer
7k 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 ...
3
votes
1answer
3k views

Debian user is not in the sudoers file

Accidentally removed my gnome desktop and am stuck in tty1. Trying to reinstall the desktop and keep getting the error "user is not in the sudoers file". Having trouble adding my user, new to debian ...
3
votes
2answers
355 views

Permissions of webserver's root directory

I've had this issue on several setups, and I'm unsure of how to handle it. At first, all of /var is owned by root:root. Clearly I don't want the web directory to be owned by root, so I do chown ...
1
vote
1answer
6k views

switching from user to root and revers (FreeBSD)

I want to make some modification with root and then with my user, in fact I want to install sudo and he give me the error in the first step: cd /usr/ports/security/sudo make install clean ...
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
6answers
193 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 ...
3
votes
1answer
103 views

How to determine if X server runs with root privileges

This is a one-liner: Is there a way/command to check if the X server is run as root or as user? This was supposed to be a one-liner but alas... I recently upgraded my Arch Linux box. After the ...
3
votes
1answer
210 views

How does having /dev/fd make running shell scripts under sudo safe?

At the end of the man page for sudo, there's the following remark: Running shell scripts via sudo can expose the same kernel bugs that make setuid shell scripts unsafe on some operating systems ...
2
votes
1answer
315 views

Why doesn't terminal show color schema once logged as root?

I'm currently using Debian 7 Wheezy, and I've noticed that the colors palette on terminal (which might be useful to identify among a large set of files and folders) are not enabled once I log as root. ...
2
votes
2answers
493 views

Gaining root privileges in SCO

I am learning Linux for work, so am still a bit rusty on the edges. I need to change the folder permission of the directory /opt, and I know in Linux, you do the following: chmod 775 /opt I get a ...
1
vote
1answer
838 views

How to suid iwconfig on Debian wheezy?

I have a script running under my own user account that takes care of all sorts of wireless interfaces. It (more or less) intelligently switches wireless LAN off and on and so forth. However, it does ...
1
vote
2answers
1k views

shell script to execute in root mode

I need execute script that have commands which should be run in root mode. If I put sudo before command then when I run script I see permission denied ( I don't have a chance to write password). If I ...
0
votes
3answers
2k views

Get environment variable of other user [closed]

Is there a way I can see the environment variable of an other user? I want to do that as root, so permissions won't be a problem I guess. For the user himself, I use echo $PATH or set | grep PATH ...