2
votes
0answers
23 views

Kerberos, .k5login and sudo

Background: I am using a Debian 7 system which I have integrated with an LDAP+Kerberos system using libnss-ldap, libpam-krb5 and nscd. I have modified sudoers to permit an LDAP group the right to sudo ...
1
vote
3answers
64 views

What's the best way to mitigate NFS and sudo?

Quick background: We have 40 workstations running Linux. NFS is used extensively for bulk data storage and home directories. This allows users to roam freely will relatively transparent file ...
2
votes
1answer
179 views

How do I “sudo -i” specific command

I need to run important_script.sh as with sudo -i without password. If I have in sudoers: apache ALL = (root) NOPASSWD: /blah/important_script.sh and run "sudo /blah/important_script.sh" I can ...
2
votes
4answers
90 views

program needs to be run as root by any user and can be located anywhere

I have some program called foo that needs root privileges when it executes. foo needs to be able to be run by any user and can be located at any path. The reason this program can be at any path is ...
0
votes
1answer
51 views

sudo su in screen — security issue?

Just logged back into a server and reconnected to an existing screen using screen -R. I had completely forgotten that I'd used sudo su - earlier and had not exited afterwards, so when I reconnected ...
2
votes
1answer
67 views

Do you need root access to fully backup a server?

I have an account on a server and I would like to automate backups onto another server, I disabled root logins for security. Do you need root access to fully backup a server?
4
votes
1answer
720 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 ...
1
vote
1answer
810 views

Accidentally deleted symlink libc.so.6 in CentOS 6.4. How to get sudo privilege to re-create it?

I accidentally deleted the symbol link /lib64/libc.so.6 -> /lib64/libc-2.12.so with $ sudo rm libc.so.6 Then I can not use anything including ls command. The error appears for any command I type ...
-9
votes
1answer
90 views

When I am root, how do I run one command as user “pi”? [closed]

When I am root, how do I run one command as user "pi"? Distribution Wheezy.
0
votes
1answer
51 views

visudo changes not taken into account

I added three lines to my sudo configuration, using visudo. User_Alias INSTALLERS = myusername Cmnd_Alias INSTALL_CMDS = /bin/yum, /bin/make INSTALLERS ALL = (root) NOPASSWD:NOEXEC: INSTALL_CMDS ...
0
votes
1answer
63 views

How to run sudo without Sudo installed

I do not have sudo installed on my machine, but I have a third party program which runs as different user other than root and tries to execute sudo command. Is there a way to enable this program to ...
1
vote
1answer
192 views

Allow normal user to run PHP script as root using SUDO

How can I allow a normal user on Ubuntu to run php scripts? sudo php /path/to/script/script.php Basically the script needs to be run as root but the users does not have root privileges on their ...
0
votes
1answer
145 views

Default user not in sudoers file

In Debian 6, right after my installation. I try to run a command as root, only to find out that my account isn't in the sudoers file. This is from the main user account that is set up under ...
0
votes
2answers
286 views

CentOS lost Root Access

For some reason I cannot access my root user via SSH. It displays the error on login: could not open session. However I happen to have another user account that is a normal non-sudo user. Is there ...
0
votes
1answer
74 views

copying files using non-root rsync

I have a primary server and a secondary server and I wish to copy files over from the primary to the secondary using rsync. I have mounted the primary disk onto the secondary using NFS and am copying ...
0
votes
1answer
114 views

Getting permission denied error

On my Media Temple DV 4.0 server I am getting permission denied errors: -bash: cd: httpdocs: Permission denied If I switch from my login user to sudo (sudo su) or switch to root using su-, I can ...
1
vote
2answers
927 views

SUDO YUM not found

I am running a Amazon ec2 instance on amazon's linux. Whenever I run anything sudo yum it give me this: sudo: yum: command not found ec2-user$ rpm -qf /usr/bin/yum yum-3.2.29-30.24.amzn1.noarch ...
1
vote
2answers
246 views

Run binary automatically as root

I have root access. How can I let a general user with little permissions run a binary file as root without a password? I tried giving it root:wheel with chown, but that did not let a general user do ...
11
votes
2answers
458 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 ...
1
vote
2answers
961 views

Run a script as root from apache

I would like to update my hosts file and restart dnsmasq from a web interface (php/apache2). I tried playing around with suid bits (the demonstaration). I have both apache and dnsmasq running on an ...
2
votes
3answers
1k views

how to deny “sudo su”

I have several servers where some users require to be sudoers to work. The problem is that when sudoers can run the command sudo su and login as user root. It seems very risky to run that command. I ...
2
votes
2answers
482 views

Remotely use root over ssh for unison

I'm a little confused on how to run unison to sync files with group and owner attributes on an ubuntu system, as you need to be root. But I need to do this remotely and automated. I know I can set up ...
0
votes
2answers
941 views

Root users and mysql: `sudo mysql` vs `/root/.my.cnf`

I have a /root/.my.cnf file which stores the mysql root user's password: [client] password = "my password" When I log in as system root and enter mysql, I get a passwordless login: myuser@local:$ ...
0
votes
2answers
657 views

Allow user act as root, so he does not need to use sudo each time?

I wish for a user to have root privileges, but editing the /etc/sudoers file to allow no password still requires me to use the sudo command before a program I wish to run with elevated privileges . I ...
0
votes
1answer
91 views

How do you tell if a user is logged in as root on Mac OS X?

If I sudo /bin/bash, the who and w command does not show a root login on Mac OS X. How do you enable this?
3
votes
3answers
6k views

How can I run supervisord without using root?

I seem to be having trouble figuring out why supervisord won't run as a non-root user. If I start it with the user set to jason (pid 1000), I get the following in the log file: 2010-05-24 ...
3
votes
3answers
26k views

chmod -R 777 / on ubuntu - numerous problems

A client has accidentally given the entire filesystem full permissions on their ubuntu 10.04 box. chmod -R 777 httpdocs/cd / As you can see they attempted to cd to the root, and instead gave chmod ...
6
votes
2answers
19k views

Debian: how to create a user with root privileges (sudo)

How do I create a user with root privileges in Debian? Maybe it sounds a bit silly, but I don't think I need user directories, only some rights to run services (mainly web server, mysql, etc.). I just ...
1
vote
3answers
263 views

UNIX User Account to Restricted SysAdmin (User/Printer Admin only)

I'd like to know if there is a way for a user account to be enabled or elevated to carry out system admin tasks WITHOUT having to use the root account or sudo. Goal here is to allow a user account to ...
3
votes
4answers
1k views

Configure sudo to ask for root password

Is it possibile to configure sudo to ask for root password instead of user password? The server is configured with a root user and a simple user (let's call him simple) with limited privileges, used ...
-1
votes
4answers
1k views

Ubuntu keep admin rights; skip entering password and sudo

I was wondering if there is a way to enter in my admin password someplace just once and keep it for my entire time logged in. I hate having to type sudo command-name* every five seconds, or typing in ...
4
votes
4answers
3k views

ubuntu - how can I avoid typing a password on every admin action?

I just set-up ubuntu 9.10 on my computer, and I'm trying to figure out how to avoid typing a password on every action that requires sudo privileges. I just want to type a password once on login and ...
5
votes
2answers
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 ...
5
votes
5answers
13k 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 ...
4
votes
8answers
11k views

How to specify root's environment variable?

I do rails development. In this app, I need to specify the environment variable LD_LIBRARY_PATH = /usr/local/oracle/lib, but when I run the app with sudo script/server, it doesn't run because that ...
2
votes
6answers
1k views

How can an attacker gain root next time a compromised account does?

I was reading Ubuntu's documentation about root/sudo when I came across the following: Isn't sudo less secure than su? The basic security model is the same, and therefore these two systems share ...
28
votes
10answers
7k 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 ...
21
votes
4answers
4k 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 ...
2
votes
3answers
6k views

How to override a PATH environment variable in sudo?

I set PATH in /etc/profile. I do not have any problems in the case of the general user, but PATH does not go when I become the root authority in sudo. What would you do to override the PATH which is ...