Linked Questions

11
votes
2answers
12k views

How does sudo really work? [duplicate]

I always thought that "sudo" just starts another login-process, specifically using "root" as a username and asking for the Password to login. After running some program, it ends and logs out (or: ...
3
votes
2answers
10k views

How are setuid, suid, sudo, and su all related? [duplicate]

I have a feeling the setuid bit, the nosuid mount option, sudo, and su are all related given their names. But how do they relate to one another? Are some of them used in conjunction? If they are ...
52
votes
5answers
23k views

Why doesn't the sudo command need the root password?

I've been using Linux for a while now and whenever I typed sudo I thought I was switching over to the root user for a command. Apparently this is not true because all I need is my user account's ...
11
votes
4answers
6k views

Which user's password does `sudo` asks for?

$ ls -l /usr/bin/sudo -rwsr-xr-x 1 root root 136808 Jul 4 2017 /usr/bin/sudo so sudo is runnable by any user, and any user who runs sudo will have root as the effective user ID of the process ...
24
votes
3answers
11k 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 ...
11
votes
3answers
3k views

login and su internals

I am trying to understand how user permissions work in Linux. The kernel boots and starts init as root, right? Init then runs startup scripts and runs getty (agetty), again as root. Agetty just reads ...
0
votes
3answers
2k views

Command not found error - bash

$ which sudo emacs /usr/bin/sudo /home/user1/local_build/bin/emacs $ sudo emacs /etc/apache2/sites-available/000-default.conf sudo: emacs: command not found $ emacs /etc/apache2/sites-available/...
1
vote
1answer
334 views

Linux - why do the su and sudo binaries need to be set-UID root?

I am trying to find the correct reason for the stated question. My understanding is that: sudo needs to read the /etc/sudoers file which is only readable by root, which is why it needs to be set-UID ...
4
votes
1answer
506 views

Late authentication

I run Debian Wheezy with a simple window manager (Blackbox). If I remember correctly, in Ubuntu some applications like Synaptic and Update Manager ask for sudo password only when/if needed. How do I ...
2
votes
2answers
129 views

Why does the root user have control over mysql directories but not show as a member of the mysql group?

It seems somewhat similar to the question here but I think what I'm asking is a little different. I've got a CentOS 5.x box running with mysql on it. The root linux user can edit/modify files in /...
0
votes
3answers
137 views

How to limit a UNIX user to only a given script?

How can I limit a UNIX user (BESIDES sudo!) to only allow it to run a script as root?