sudo - Execute a command with superuser privileges.

learn more… | top users | synonyms

24
votes
6answers
14k 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 ...
6
votes
2answers
3k views

Write to a file without redirection?

I am writing a regular compiled application that needs to create a special file and write a magic cookie into it. I can’t write the file directly from the application, the system security model ...
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 ...
7
votes
2answers
2k views

Once sudo su'd to root, is there a command to see my username?

I have sudo rights on a redhat box; once I've "sudo su -" to become root in a shell, are there any commands I can run to see what username I su'd FROM?
0
votes
1answer
2k views

Debian 6.0 RC1: Cannot login as root and user is not a sudoer

After installing Debian 6.0 rc1, I can't do anything as administrator because I cannot login as root (but I did setup the password during installation) and user is not a sudoer either. Did I miss ...
3
votes
2answers
471 views

Why did my sudoers file suddenly reset itself?

After setting up Wave in a Box on my Debian server, I started noticing strange things happening: I could no longer use sftp to transfer files, and even worse, I couldn't run any sudo commands! ...
8
votes
2answers
7k views

JAVA_HOME not set in script when run using sudo

I'm trying to run an install script that requires java to be installed and the JAVA_HOME environment variable to be set. I've set JAVA_HOME in /etc/profile and also in a file I've called java.sh in ...
3
votes
1answer
1k views

Adding kill to a sudoers group

How can I give permissions in sudoers such that each member of a group is able to kill the process owned by another member of the group? Scenario: I have two users -- bill and dev-cron -- who are ...
4
votes
5answers
4k views

What sudoer spec allows users to mount cifs shares?

I'm trying create a line in /etc/sudoers that allows members of group "users" to mount cifs shares anywhere inside their own home directory. In my first attempt I tried: %users ALL=/bin/mount -t cifs ...
2
votes
3answers
738 views

How do I use redirection with sudo [duplicate]

Possible Duplicate: Redirecting stdout to a file you don't have write permission on Yeah I could (and probably will) just escalate to root, but I'd like to know why this doesn't work? ...
7
votes
3answers
9k views

How to set visudo to use a different editor than the default on Fedora?

Fedora 14 uses vi by default when one runs visudo. Is there a way to change this to something else?
21
votes
4answers
42k views

How to make Fedora user a sudoer?

I want to give a Fedora user sudo privileges. How do I do that?
14
votes
4answers
437 views

What specific vulnerabilities am I creating by disabling the sudo password?

Here are some instructions on how to disable your sudo password. These carry the following warning If you disable the sudo password for your account, you will seriously compromise the security of ...
8
votes
2answers
4k views

How do I get sudo -u $user to use the users env?

It seems when sudoing down that using sudo -u $user that the environment of root is still being used. How can I make sudo use the users environment? as a special note not all users that I will be ...
1
vote
2answers
2k views

How to insert text into a root-owned file using sudo? [duplicate]

Possible Duplicate: Redirecting stdout to a file you don't have write permission on Running a command like sudo echo 'text' >> /file.txt fails with: bash: /file.txt: Permission ...
6
votes
1answer
642 views

sudo missing on Palm WebOS - can I add it?

I've rooted my Palm Pre (WebOS 1.4.5) and installed a SSH server on it. Now I'd like to SSH into it with an unprivileged user and use sudo for elevated commands. However: There is no sudo on the ...
36
votes
4answers
13k views

How do I run a command as the system administrator (root)

I need to run a command with administrative privileges. Someone said I should run a command as root. How do I do this?
8
votes
2answers
8k views

using sudo on GUI applications

When I was using kubuntu, I could always open X applications with sudo, sudo kate for example. Now that I've switched to arch that doesn't work. I know I've always been told to use kdesu, but what ...
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?
39
votes
5answers
3k views

Redirecting stdout to a file you don't have write permission on

When you attempt to modify a file without having write permissions on it, you get an error: > touch /tmp/foo && sudo chown root /tmp/foo > echo test > /tmp/foo zsh: permission ...
71
votes
6answers
21k 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
11k 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 ...