1
vote
3answers
469 views

How to gain root privileges for specific user if we have root password? [closed]

Can someone suggest how can I change process privileges in Linux to root ? Assume, I have a normal process running under some user-consider me. Now my script should create some users using 'useradd' ...
2
votes
0answers
99 views

Understanding getlogin spoofing

My question is in three (or so) related parts: 1) My understanding is that getlogin() will effectively return the auid associated with the process and so isn't actually changable by the user. Is that ...
2
votes
3answers
2k views

Switching to superuser while shell script is running

I have a shell script that contains the following lines: CURRENT_USER=${USER} echo $CURRENT_USER su echo switch to `who am i` Once the 2nd line is executed, the shell prompts me to enter the root ...
5
votes
2answers
1k views

Alternative to su/sudo on barebone system

I'd like to run some unit tests in a barebone chroot jail on Solaris. There's no su or sudo, and a copy of su (with libpam.so.1) just returns exit code 1 without any output, with or without ...
82
votes
7answers
11k views

Which is the safest way to get root privileges: sudo, su or login?

I would like to have the root account in safety even if my unprivileged user is compromised. On Ubuntu you can only use sudo for "security reasons" by default. However I am not sure it is any safer ...