sudo - Execute a command with superuser privileges.

learn more… | top users | synonyms

3
votes
2answers
11k views

How to add self to sudoers list?

I've added myself into the sudoers users list by using the command root@debian:/home/oshirowanen#adduser oshirowanen sudo If I try to run that command again, root@debian:/home/oshirowanen# ...
0
votes
1answer
951 views

Masquerading as another user from sudoers file?

My /etc/sudoers file has following entries:- ## Allow root to run any commands anywhere root ALL=(ALL) ALL agupta ALL= /sbin/,/usr/sbin/,/bin/,/bin/cat /etc/sudoers ADMINS ALL= !/usr/bin/su, ...
3
votes
1answer
157 views

Redirecting output in the shell, permissions

I have a question about permissions. Distro: Debian GNU/Linux 6.0.4 (squeeze) So I have a folder with a php script in it. Both folder and file are owned by User1 If I do this: php script.php I ...
0
votes
3answers
497 views

What does sudo su work but su does not? [duplicate]

I have tried this on Fedora and on Ubuntu. kshitiz@kshitiz:~$su su: Authentication failure kshitiz@kshitiz:~$sudo su root@kshitiz:/home/kshitiz# I am entering the same password in both the cases. ...
1
vote
2answers
3k views

sudo: password prompted even when NOPASSWD is set [duplicate]

~/bin$ cat setbrightness id echo $1 > /sys/class/backlight/intel_backlight/brightness ~/bin$ whoami rag ~/bin$ sudo -l Matching Defaults entries for rag on this host: env_reset, ...
1
vote
2answers
1k views

What is the difference between gksu and sudo?

I presume this applies to any Gnome desktop. What is the difference between these two commands? According to the Ubuntu documentation and questions that reference it, the former also sets the $HOME ...
0
votes
2answers
1k views

Changing root password does not change sudo password

I'm trying to change the password that get's asked when doing sudo. I'm in Ubuntu. Doing 'sudo passwd' or 'sudo passwd root' does give me the two new password questions, and it successfully changes ...
2
votes
2answers
174 views

Does the sudo user need a home directory?

In my setup, my aim is to have A standard user with minimal permissions to use on a daily basis A superuser account, defined in /etc/sudoers. Does this second user need a home directory? Both of ...
1
vote
2answers
113 views

run a command as different user with available sudo permissions

I want to run the below command echo 1000 > /sys/class/backlight/intel_backlight/brightness i cannot do it it like below beecause bash is the process that actually directs output to the ...
6
votes
1answer
7k views

Is it okay to disable requiretty?

I'm trying to set up a deploy script using Capistrano At a step cap deploy:setup script is connecting to my server and trying to run commands that create directories. Then I see an error: msudo: ...
2
votes
1answer
272 views

Setting the root password vs. sudo -i

Should one always set a root password, or is sudo -i acceptable? Two problems is in reading other posts (maybe junk I realize): sudo -i eliminates the need for a password. Isn't that a problem for ...
2
votes
1answer
74 views

Using sudo to give access to another account on same machine

There are two unix accounts A and B.I want to execute a unix command from account B such that the command behaves as if it was executed from account A .How can I do this ? The problem here is that ...
2
votes
4answers
2k views

Should I use `sudo` or `su` in a startup script?

I have a personal program, that has a server/client design. The server daemon part of it, should be run as its own limited user, and the program was not designed to drop its root privileges (if ...
1
vote
1answer
186 views

Cannot enter in centOS with any user

I am using cent OS Operating system without GNOME. In the starting, it asks localhost login: Password: It has one user named service under group name service whose password is also service. I ...
1
vote
0answers
121 views

External HDD read/write permission changing from a cron job

So, I run an overnight python script that runs a backup of our web data in the /var/www directory, then moves the backups to an external HDD in /media. The script in scheduled in the sudo crontab ...
4
votes
1answer
11k views

Suddenly, I Can't login with correct password (greeter & tty)

This might be a duplicate of other password related questions but it's somehow eccentric. I have 3 accounts in my Ubuntu 12.10 system (one standard and two administrators). One of the administrator ...
1
vote
0answers
304 views

git deploy using sudo nopasswd

I'm trying to write simple post-recieve script, which would switch to webserver user and pull git repository. To do so, I added git user to sudoers (I've added this to very last line): git ALL = ...
0
votes
1answer
509 views

Apt-get, no sudoers file

I am trying to install a module using apt-get. I do the following: sudo apt-get install But I get the following error: sudo: can't stat /etc/sudoers: No such file or directory sudo: no valid sudoers ...
1
vote
2answers
89 views

how to require sudo to view files?

I have a ssh server. I allow people to connect to it if they want. I do my programming homework on it. I am in trouble with my teacher because people were cheating off it. I need to know how to ...
0
votes
1answer
212 views

Execute John the Ripper on multiple processors using mpirun

I am a linux noob trying to optimize John the Ripper for a security class. I am trying to use both processors to run John by using the mpirun program as suggested in this tutorial. I installed mpirun, ...
2
votes
1answer
2k views

Can't use su or sudo on Arch Linux

Sudo returns this error: sudo: effective uid is not 0, is sudo installed setuid root? And su - returns this: su: Authentication failure The user I'm using is a member of the following groups: ...
1
vote
0answers
246 views

Bodhi Issue with Nautilus as SU

I am unsure how to run Nautilus with superuser privilieges on Bodhi, or if this is just a bad idea altogether. I am looking for a file manager that can browse my local network, and can be run as ...
2
votes
1answer
473 views

sudo hangs indefinitely without prompting for password

When I logged back into my Ubuntu desktop after an update, my display driver was seemingly unavailable and I was met with vt-7's output. I changed to a different terminal and logged in. However, when ...
4
votes
2answers
200 views

How to automaticaly enter sudo's grace period upon login

Knowing that giving a user a sudo's grace period right from the point when he/she login might be a security issue, I still think it will be a beneficial trade-off between security and usability in my ...
0
votes
0answers
47 views

Root user can't do everything? [duplicate]

Possible Duplicate: Redirecting stdout to a file you don’t have write permission on I'm quite new to Linux and I have a permissions questions. I'm using Linux Mint. If I go to /opt and do ...
1
vote
2answers
455 views

Is it possible for sudo to read password from gnome-keyring or similar

I'm currently using sudo a lot in a bunch of scripts, which is turning into a bit of a hassle, as some scripts does not allow interactive input (e.g., Makefiles). Instead of disabling sudo passwords ...
2
votes
3answers
1k views

Run local scripts on multiple servers using sudo user through a script

I have about 100 remote servers. I want to manage all my servers using one terminal server to update , run commands with sudo privileges. I need to have one main script that takes another test script ...
1
vote
1answer
352 views

Allow user to see how many iptables rules are loaded, but not actual contents?

I want to allow user to check how many rules are present in filter table, but not able to view actual rules, is that possible? literally I mean iptables -L | wc -l (I know it's faulty), but sudo ...
1
vote
1answer
444 views

Passwordless sudo of a command containing a comma

I have a number of users of a desktop machine, who each have a folder on a remote samba server. I am trying to set up per-user mounting of these network folders following the instructions here: ...
0
votes
1answer
362 views

run 'service php5-fpm restart' without using sudo

I am integrating my cakephp projects using jenkins. Right now, I am exploring the use of Phing. There is one task where I need to run service php5-fpm restart So far I tried to do this manually. ...
1
vote
2answers
427 views

How to set Cmnd_Alias properly?

I have one script to allow for one user to run. The string calling it from the command line looks like ./script path/to/folder -a option='value' When I try to add it to the other commands in ...
6
votes
1answer
2k views

sshfs mount, sudo gets permission denied

I am using sshfs to mount a folder with some python projects over ssh to my ~/ directory. $ mkdir -p ~/mount/myprojects $ sshfs user@myserver:/home/user/myprojects ~/mount/myprojects I can perform ...
2
votes
1answer
108 views

sudo vs “rwx” access

I am new in Linux environment and I would like to know if rwx access on Linux file system can substitute sudo access to run a command. i.e.: I have the command abcd in /etc/init.d/ and I do have rwx ...
2
votes
1answer
270 views

sudo: ./server: command not found

I wrote a piece of software called "server" and I am trying to run it on a different linux box. The command I am typing is: sudo ./server I am in the directory with 'sever' in it, and it tells me ...
1
vote
2answers
2k views

How to allow www-data to create a folder without giving read access to the parent folder

I'm not exactly sure the right question to ask, so I'll try to explain what I'm trying to do. I have an internal web application (in PHP) that I want to be able to create a folder. The trouble is ...
2
votes
1answer
475 views

Sudo does not work in chroot

I would like to be able to use the sudo command in a chroot environment. I start the chroot as follows: chroot /debian-squeeze /bin/bash Now I'm logged in as root in the chroot. I can do su user ...
3
votes
1answer
440 views

Why can I only use apt-get as super user ? Mint 14 Linux

Not sure what info you need here, if any. Just let me know. I have a proxy that bypasses the corporate net set in my profile file for both su and normal user. When I do a sudo or regular apt-get ...
1
vote
1answer
660 views

What is “ALL ALL=!SUDOSUDO” for?

The last line of the /etc/sudoers file is: grep -i sudosudo /etc/sudoers Cmnd_Alias SUDOSUDO = /usr/bin/sudo ALL ALL=!SUDOSUDO why? What does it exactly do? UPDATE#1: Now I know that it prevents ...
1
vote
1answer
768 views

add members of wheel group, sudo access

On Fedora15, following this wiki, I added a user to wheel group, which is already in the sudoer config file. but still I get not-a-sudoer error prompt. Should I specifically name every member of a ...
1
vote
0answers
364 views

gkSudo Error no matter what I do

I don't know why, It wasn't happening yesterday. Was it because I turned the machine off and back on again this morning? Anyway here's the error. GkSudo won't run anything at all now. (gksudo:3262): ...
0
votes
1answer
2k views

How to use sudo in Fedora?

I use to be a fans of Ubuntu, when I want to execute a command as root user, I do this sudo blah_blah_blah. But in Fedora 16, it doesn't seem recognize this command. Any clue on this?
0
votes
2answers
212 views

sudo: script launched from another script won't redirect standard output

I'm using AIX 5.3 with sudo 1.6.9p23. Sudoers file grants user fcomartin permission to run any command as user oas: fcomarti ALL=(oas) ALL User oas has a bash script called menu, which launches ...
1
vote
1answer
312 views

Can I get correct $PATH when executing sudo -u db2inst -sh “db2”?

I need to run sudo -u db2inst1 sh -c "db2 connect to db; db2 set schema Edumate; db2 \"select * from edumate_settings\"" but I don't want to specify absolute path to db2 If I run sudo -u db2inst1 sh ...
3
votes
2answers
292 views

How do you automatically elevate an automatic task to root privileges or is there an alternative approach?

I'm trying to write, in essence, an automatic deployment script for use by our development team and I know I can set up SSH to use keys so that I can automatically authenticate via key instead of ...
5
votes
3answers
248 views

Are sudo and gksudo safe?

I noticed after running a sudo command in terminal or running a administrative application that uses gksudo, it won't ask again for the password for a time (something like 5 minutes). Now let's ...
1
vote
3answers
712 views

How to change shells via script?

I have to repeat following operation a lot of times, hence I want to automate it. sudo su tcsh cd $workDir Here $workDir is set in ~/.tcshrc. I tried writing two shells scripts. Script1 is temp.sh ...
2
votes
2answers
293 views

Finding root password

I installed a Ubuntu and it only has a user. I can login to the system without login. It doesn't ask me for un/pwd. but when I am in, and I want to run some commands as root (sudo), it ask for ...
0
votes
1answer
503 views

log into ec2 using SSH but sudo prompts for password

Have an EC2 instance. Connect via ssh. Can navigate through directories. When I try to use a sudo command, I am prompted for a password. ubuntu@ec2-ip-address:/etc$ sudo su root [sudo] ...
5
votes
2answers
5k views

How do I find out if I am sudoer?

How does Linux system behave when I am not sudoer? Here is what happens if I try to use sudo: server:/tmp>$ sudo cal [sudo] password for user: Sorry, try again. Is it possible that I just don't ...
6
votes
1answer
570 views

Only one file name allowed error

Sometimes I forget to do sudo vim and open files to which I don't have write permission. I saw this post and it was really helpful. When I did :w !sudo tee % it asked me for a password and then the ...