Questions tagged [root]

root is the default administrative account for Unix-based systems. It is comparable to the Administrator account of a Windows system.

Filter by
Sorted by
Tagged with
138 votes
24 answers
23k views

How do you make it obvious you are on a production system?

A few of us at my company have root access on production servers. We are looking for a good way to make it exceedingly clear when we have ssh'd in. A few ideas we have had are: Bright red prompt ...
Sionide21's user avatar
  • 1,553
103 votes
6 answers
311k views

Adding a directory to $PATH in CentOS?

We just got our new server(s) up and we're running CentOS on them all. After successfully installing Ruby Enterprise Edition, I would now like to add the REE /bin (located at /usr/lib/ruby-enterprise/...
vonconrad's user avatar
  • 1,281
66 votes
7 answers
141k views

What permissions are needed to write a PID file in /var/run?

On Ubuntu: touch: cannot touch `/var/run/test.pid': Permission denied I am starting start-stop-daemon and like to write the PID file in /var/run start-stop-daemon is run as my-program-user /var/run ...
s5804's user avatar
  • 785
64 votes
13 answers
9k views

Linux: productive sysadmins without root (securing intellectual property)?

Is there any way to make a seasoned Linux syadmin productive without giving him full root access? This question comes from a perspective of protecting intellectual property (IP), which in my case, is ...
Matt's user avatar
  • 1,047
56 votes
4 answers
7k views

nice sudo or sudo nice?

is there any difference between running an intensive task over sudo with the following commands?: nice sudo [intensive command here] sudo nice [intensive command here] BTW this is for Linux 3.x.
Nicolas Laplante's user avatar
51 votes
4 answers
3k views

Linux: set up for remote sysadmin

Every now and then I get the odd request to provide remote support, troubleshooting and/or performance tuning on Linux systems. Larger companies often already have well established procedures to ...
HBruijn's user avatar
  • 80.3k
47 votes
8 answers
323k views

How do I list all superusers?

On a linux box, how do I list all users that possess identical privilege to the superuser (and even better, all users in general along with if they are able to escalate their privilege to that level ...
Eric's user avatar
  • 473
44 votes
7 answers
57k views

Bash Scripting: Require script to be run as root (or with sudo)

I'm trying to write a bash script (in Ubuntu) that will backup a directory using tar. How can I do a check in the script so that it can only be run as root (or with sudo)? For instance, if a user ...
Cory Plastek's user avatar
42 votes
4 answers
169k views

Allow linux root user mysql root access without password

On cPanel when I am logged in as root and type "mysql" without hostname and password it gives me direct access to mysql root user. I would like to do this for one of my non-cpanel server where the ...
user1066991's user avatar
41 votes
9 answers
16k views

Multiple Linux sysadmins working as root

In our team we have three seasoned Linux sysadmins having to administer a few dozen Debian servers. Previously we have all worked as root using SSH public key authentication. But we had a discussion ...
Signum's user avatar
  • 1,258
40 votes
7 answers
88k views

How do I disable root login in Ubuntu?

a while ago I gave root a password so I could log in as root and get some stuff done. Now I want to disable root login to tighten security, since I'm going to be exposing my serve to the internet. I'...
Ben Hymers's user avatar
35 votes
8 answers
152k views

Chown operation not permitted for root

I try to chown the owner of a file to root, but I can't. I'm doing this as root. I get the following message: chown: changing ownership of `ps': Operation not permitted
Peter Stuifzand's user avatar
33 votes
10 answers
13k views

Why su to root instead of logging in as root?

I've heard often that it is better to su to root rather than log in directly as the root user (and of course people also say that it's even better to use sudo). I've never really understood why one ...
thepocketwade's user avatar
30 votes
4 answers
9k views

vim re-edit as root

I often open a file in vim, make some changes and when it's time to save the file is read-only.. (owned by another user). I'm looking for tips on how I could re-open the file as root and keep my ...
rkthkr's user avatar
  • 8,678
29 votes
2 answers
6k views

Why is the maximum length of OpenWrt’s root password 8 characters?

When I try to set root's password: root@OpenWrt:~# passwd Changing password for root Enter the new password (minimum of 5, maximum of 8 characters) Please use a combination of upper and lower case ...
Alan42's user avatar
  • 571
27 votes
8 answers
7k views

Accidently ran "chown www-data:www-data / -R" as root

I just ran this a few seconds ago. I managed to do Ctrl - C as soon as I realized what I started doing. So far the only directory it's started going through is /bin. I'm afraid to do anything else. ...
Will's user avatar
  • 441
24 votes
9 answers
20k views

Should we disable the root user?

Should we remove the root password, disable remote login and basically require adminstrators to use sudo to perform administrative actions?
jldugger's user avatar
  • 14.5k
24 votes
6 answers
31k views

Ubuntu - can non-root user run process in chroot jail?

Is it possible for a non-root user to run a chroot process on Ubuntu?
Hawkeye's user avatar
  • 2,739
23 votes
7 answers
193k views

How to configure vsftpd to allow root logins?

I'm on SLES 10.1, and trying to configure vsftpd to allow root logins. Does anyone know how to do this? So far, I have this: local_enable=YES chroot_local_user=NO userlist_enable=YES userlist_deny=...
user8269's user avatar
  • 231
21 votes
4 answers
9k views

Ordinary users are able to read /etc/passwd, is this a security hole?

ls -l /etc/passwd gives $ ls -l /etc/passwd -rw-r--r-- 1 root root 1862 2011-06-15 21:59 /etc/passwd So an ordinary user can read the file. Is this a security hole?
Ankur Agarwal's user avatar
20 votes
9 answers
8k views

root login or sudo user for server administration?

I'm trying to understand the technical arguments/security implications between ssh'ing with root directly, or making an auxiliary sudo user in the context of maintaining a server. To clarify, we're ...
alex.b.bg's user avatar
  • 143
19 votes
5 answers
3k views

Remote Linux Admin Consultant - Best Practice [closed]

We are engaging a consultant in India as our Linux Administrator. We don't know him well and he requires Root access to all our servers to do his job (including a security audit). What is the best ...
Anderson Tess's user avatar
19 votes
4 answers
39k views

Procedure to forward root email to external email

I would like to forward the emails received by root to an external email on an Ubuntu node. I have seen this post, but it does not explain much about the procedure to follow. There are some other ...
Jérôme Verstrynge's user avatar
17 votes
3 answers
23k views

Rsync over ssh with root access on both sides

I have one older ubuntu server, and one newer debian server and I am migrating data from the old one to the new one. I want to use rsync to transfer data across to make final migration easier and ...
Tim Abell's user avatar
  • 1,391
16 votes
1 answer
81k views

Is PermitRootLogin=prohibit-password still necessary when PasswordAuthentication=no?

Our server cluster has remote root access enabled for rescue purposes, and we generally set PermitRootLogin prohibit-password in /etc/ssh/sshd_config because LDAP users can still login using password. ...
iBug's user avatar
  • 1,308
16 votes
2 answers
8k views

AWS - removing ec2-user from sudo list

I'm running a production-level Amazon ec2 instance, and I want to close out root privileges to all users. Normally, when one logs in to the instance as ec2-user, the ec2-user immediately gets sudo ...
Nicholas Finch's user avatar
16 votes
6 answers
50k views

Why (or how) does the number of open file descriptors in use by root exceed ulimit -n?

Our server recently ran out of file descriptors, and in regards to that I have some questions. ulimit -n is supposed to give me the maximum number of open file descriptors. That number is 1024. I ...
oligofren's user avatar
  • 641
15 votes
2 answers
2k views

how do i perform root actions from non-root account?

I want to be able to restart services from a php-script. running under the www-user account. What's the preferred way to perform these actions? I recon I can place create a file with que'd commands, ...
user65297's user avatar
  • 335
15 votes
5 answers
31k views

Allow root login from one IP address only

I have centos5. Is there any way that i can log into my vps server with root user from particular ip address only. I have read that i can use private key to login into sshd. But the problem is i am ...
user avatar
15 votes
6 answers
7k views

Correct user names when tracking /etc/ in git repository and committing as root

We use git to track changes in /etc/ on our servers. Administrators work as root when changing files in /etc/, and thus their commits have author root <root@machinename> This is not very ...
cweiske's user avatar
  • 817
14 votes
6 answers
14k views

SSH - How to include "-t command" in the ~/.ssh/config file

I use ~/.ssh/config file so that I can easily enter ssh myserver and it'll provide the correct username, port, hostname, identity file, etc. However for many servers, the first thing I do is enter su ...
Amandasaurus's user avatar
  • 32.3k
14 votes
2 answers
4k views

What is the difference between "sudo -i" and "sudo bash -l"

There is a recent question regarding multiple sysadmins working as root, and sudo bash -l was referenced. I searched for this on google and SE, but I don't understand the difference between sudo ...
Rqomey's user avatar
  • 1,065
13 votes
5 answers
52k views

ubuntu: let a user run a script with root permissions

I have ubuntu 8.04 and I want to write a bash script that runs as root which every user can run. I myself can do sudo. How do I do that? CLARIFICATION: I don't want to do it with sudo, because then ...
flybywire's user avatar
  • 607
13 votes
4 answers
50k views

Is there any way to point the root domain to a CNAME? [duplicate]

Here is the problem: we host our website with an external provider that doesn't give us an IP address, rather, they give us a domain where we point our www CNAME record to. I assume they are using ...
Ryan Mortier's user avatar
12 votes
11 answers
27k views

Best way to go about changing a root password on 3000+ Solaris, AIX, and Linux servers?

Long story short: Big old corporation, lots of UNIX/Linux servers. I inherited responsibility for a bunch of scripts that that left a few years ago. One of them was a script that would be run every $...
fizzlepapers's user avatar
12 votes
3 answers
6k views

What's the best solution to manage root password of thousands servers

I'm a system administrator. In the production environment I need to manage thousands of servers. My colleagues and I uses a central manage server and distribute its public key through other servers. ...
yegle's user avatar
  • 706
10 votes
1 answer
18k views

Recommended way to start supervisord from non-root bash script?

I have set up supervisor to monitor some processes. Because I deploy via remote script, I need a way to send supervisor start/stop commands without sudo. I'm not sure how to do this though. Is there ...
user1561108's user avatar
10 votes
6 answers
1k views

Why shouldn't root be allowed to login via ssh?

why should root access be disabled for ssh? I always hear that's for security reasons. But I don't get it. What's different to login as non-root and then sudo su -? What's the preferred way to handle ...
user avatar
10 votes
2 answers
62k views

Root is not allowed to grant privileges on a MySQL database

I have a MySQL database and I am not able to grant permissions to users on newly created databases when logging in as root. mysql> create database test1; Query OK, 1 row affected (0.00 sec) ...
sz4kerto's user avatar
  • 201
10 votes
4 answers
14k views

Write once, read many (WORM) using Linux file system

I have a requirement to write files to a Linux file system that can not be subsequently overwritten, appended to, updated in any way, or deleted. Not by a sudo-er, root, or anybody. I am attempting to ...
phil_ayres's user avatar
9 votes
4 answers
3k views

root full Linux. No free blocks

df -h reports the '/' partition to be 100% full. While running du -hs * on each directory of this partition shows there is still lot of space. tune2efs which reports just one block to be free. Ran ...
Ankit's user avatar
  • 215
9 votes
2 answers
52k views

NFS Share with root for anonuid / anongid

I've exported a share from my server and set anonuid and anongid to be 0 (root). However, when I mount the share on the client, it doesn't appear my settings are working as I'm getting permission ...
Jason's user avatar
  • 381
9 votes
1 answer
2k views

Why is the root user named root by default?

This might seem like a silly question but I could see this as being confusing. For example: "Go to root directory" Could be interpreted as: Go to / Go to ~root (usually /root/) I would think ...
Belmin Fernandez's user avatar
9 votes
2 answers
3k views

should use sudo or just su root in server management?

Which approach is better? For desktop usage, it seems that sudo is better since: I can have a more consistent history as a normal user Don't need to remember two passwords, which is especially true ...
weakish's user avatar
  • 211
8 votes
4 answers
14k views

How Ubuntu cloud version enforces the "no root login" over ssh?

I'm looking to tweak ubuntu cloud version default setup where is denies root login. Attempting to connect to such machine yields: maxim@maxim-desktop:~/workspace/integration/deployengine$ ssh root@...
Maxim Veksler's user avatar
8 votes
4 answers
1k views

Remote Root Login

I know one of the first things you do to secure a server is disallowing remote root login. Passwords are pretty weak; what do people think of only allowing root login via ssh keys or other password-...
Kousha's user avatar
  • 2,060
8 votes
1 answer
28k views

Ansible ssh as user and execute has root (expect like)

I have to administer an important number of hosts where there is only one user able to access from SSH (let's call him foo) and then have to login as root to execute privilegied commands. Foo user ...
Arka's user avatar
  • 173
8 votes
1 answer
887 views

Allow password access for all users except root?

I want to leave the root user enabled on my servers for convenience, and the only reason people are against the idea (that I know of) is brute-force attacks on SSH. So, is there is a way in SSH to ...
Soviero's user avatar
  • 4,376
8 votes
3 answers
6k views

How to get the number of available updates on an Ubuntu system as a normal user

I need this for a simple monitoring script which i don't want to run as root...
Joe Kandaba's user avatar
8 votes
4 answers
453 views

Who gets root access?

I'm working on a web application which handles some sensitive data. We're getting pretty tight on security, and laying out policies to lock down access to machines, and log everything for technical ...
Ross McFarlane's user avatar

1
2 3 4 5
12