su is a utility to run a shell or other command as another user (root by default).

learn more… | top users | synonyms

5
votes
2answers
940 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 ...
2
votes
1answer
160 views

Is it possible to set su to use WE password dialog

I have sometimes problem when during entering password for su other window appears and steals the focus ("wait - did I just entered root password on public IRC chatroom?" - it did not happened but ...
1
vote
3answers
3k views

running multiple commands for su in bash

I would like to use su -c to run as root multiple commands altogether. I don't want to use an extra script for this. I tried the following su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & " ...
2
votes
1answer
1k views

FreeBSD: Opening X applications after su to root?

Using FreeBSD 8.2. I'm accessing my machine over vnc using tightvnc. I log in as my normal user. This is okay. I can open X applications and they display fine. Then I su to root and they won't ...
13
votes
4answers
795 views

What is SSH - the protocol and what is ssh - the utility?

What is SSH - the protocol? What is ssh - the unix utility and how does it work? How is SSH protocol related to SFTP? What is sshd? Does the command su use ssh or sshd?
80
votes
7answers
10k 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 ...
3
votes
2answers
873 views

How to trace a process to original user?

Say, on a Solaris server, user1 logs in, switches to someother user, say sruser, using su - and then starts a process of id X. And then another user user2 logs in, switches to sruser the same way and ...
23
votes
6answers
12k views

What is the need for 'fakeroot' command in linux

Why do we need fakeroot command at all? Can't we simply use the sudo or su commands? The man page says: fakeroot - run a command in an environment faking root privileges for file manipulation ...
3
votes
2answers
3k views

su vs su - (on Debian): why is PATH the same?

I know what should be the difference between su and su -, but in my system (debian testing) for example PATH is the same: [root]# su [root]# echo $PATH ...
6
votes
2answers
8k views

Is it possible to su without being prompted for a password?

I suspect su doesn't have any way to allow passing the password from the shell instead of being prompted for one, for security reasons (couldn't find anything in the MAN). Is this true?
68
votes
2answers
7k views

Why do we use su - and not just su?

I don't understand why su - is preferred over su to login as root.
7
votes
4answers
1k views

sudo permission denied but su grants permission

this is the first occurrence where su was required for me. I read an article about changing the value in /sys/devices/virtual/backlight/acpi_video0/brightness to alter my laptop's screen brightness. ...
5
votes
5answers
4k views

How do I suppress dd output?

I have a bash script that creates some file using dd. The problem is dd throws a great amount of output that is going to mess with the output of my script. Searching around I've found a solution: dd ...
3
votes
2answers
898 views

`$XAUTHORITY` appears from 'nowhere' on su+tmux

When I switched from su+bash to su+tmux+zsh I noticed that I get $XAUTHORITY variable defined as /root/.xauthXXXXXX where XXXXXX are 6 random alphanumeric characters. With previous configuration X ...
9
votes
2answers
3k views

When do su and sudo use different passwords?

I am able to run anything using sudo; my password is accepted. But whenever I try to do su from a shell, it fails with: su: incorrect password What can the problem be?
65
votes
5answers
19k views

Where did the “wheel” group get its name?

The wheel group on *nix computers typically refers to the group with some sort of root-like access. I've heard that on some *nixes it's the group of users with the right to run su, but on Linux that ...
3
votes
2answers
8k views

su options - running command as another user

I was wondering how to run a command as another user from a script. I have the script's owner set as root. I also have the following command being run within the script to run the command as the ...