sudo - Execute a command with superuser privileges.

learn more… | top users | synonyms

0
votes
3answers
126 views

SSH Agent-Forwarding works, but what about sudo -u username no shell/ permissions? composer

Working on a remote server (A) I want to use my local SSH-Keys to access a repository on another server (B) that is not controlled by me. Generally this works like a charm. I log in as myUsername ...
0
votes
1answer
369 views

Launch application as root user in GNOME

I've got CentOS 6 installed on my server. A few users want to have access to it via VNC, so I installed GNOME separately. Everything works okay, but I want to have possibility to run applications as ...
0
votes
0answers
58 views

Debian wheezy using gnome classic requires root for system modifying changes

I am using Gnome classic on Debian Wheezy, and I sometimes get a popup for package updates. The UI prompts for a root password, and will only accept root. Is there some way for me to add my account to ...
1
vote
2answers
64 views

Why does it take more time for a login to fail than to succeed? [duplicate]

When logging in to my PC, and the password is correct, the login takes place nearly instantaneously. When the password is wrong, it takes a few seconds of waiting until the hint "The password is not ...
1
vote
3answers
94 views

Wrong Permission to /etc folder [duplicate]

I have given the wrong permission to the /etc folder chmod -R 777 /etc When I want to login as root it gives me an error and the following output. How can I correct the permissions? ...
0
votes
1answer
29 views

Write a file in /var/lib/sysnews/ [duplicate]

In that folder are stored the news files: they can be created by the system administrator to write some informations for the users, as suggested in this link. I tried as a normal user to add a file ...
5
votes
1answer
75 views

Why does visudo discourage other editors?

man visudo explains that visudo will not (by default) use EDITOR or VISUAL environment variables. It states that "There is no easy way to prevent a user from gaining a root shell if the editor ...
4
votes
1answer
309 views

Sudo permissions by ldap groups via nslcd

I have a problem with my sudo permissions in an MS ActiveDirectory to Debian LDAP authentication/authorization setup. What I have so far I've configured nslcd with libpam-ldap via ldaps and ssh login ...
0
votes
1answer
94 views

Adding www-data to /etc/sudoers dos not work for PHP shell_exec() to run a command

I'm running the webserver lighttpd on Raspbian (Debian based) on a Raspberry Pi. The server runs as user www-data (checked with ps aux). I added the following line to /etc/sudoers: www-data ...
2
votes
1answer
65 views

Root Password Policy and Refresh

Unfortunately the infrastructure I work in has static root passwords that are very rarely refreshed. So people leaving the company will have our root passwords and it can potentially be leaked to ...
2
votes
2answers
66 views

User created without a password behaves as if he had one

Inside one of my scripts, I created an user based on a directory arrangement on another machine. The thing is that this user, created without a password, behaves just as he had one : he has sudo ...
-1
votes
1answer
86 views

Why sudo ./bin/mysqld_safe & on Mac OS X 10.6.8 doesn't ask for password?

I get the following permissions from terminal: $ cd /usr/local/mysql $ ls -l drwxr-xr-x 41 root wheel 1394 29 Apr 00:55 bin drwxr-xr-x 4 root wheel 136 29 Apr 00:55 docs ...
3
votes
2answers
319 views

I'm not getting privileges, edited /etc/sudoers [duplicate]

I want to run any program without asking root password. Because I'm the only person who use the system. So I googled and edited /etc/sudoers. What I did: # chmod 640 /etc/sudoers # vim /etc/sudoers ...
4
votes
2answers
83 views

System Crontab or Root Crontab

System crontab: /etc/crontab Root crontab: sudo crontab -u root -e Which way is preferred? As they all run tasks within administration privilege.
0
votes
1answer
57 views

Can't simulate initial login using sudo

$ sudo -iu cyrus sudo: unable to change directory to /srv/cyrus: Permission denied sudo: unable to execute /bin/zsh: Permission denied I don't understand why I would get permission denied for ...
61
votes
19answers
8k views

Root access that can't change root password?

We are having a little problem on a server. We want that some users should be able to do e.g. sudo and become root, but with the restriction that the user can't change root password. That is, a ...
4
votes
3answers
1k views

Automate login with sudo and su

I know the security risks, but I am performing this experiment/exercise on an old, seldom used *nix machine I have laying around the house. So doing this exercise will not bring any security risk to ...
1
vote
1answer
203 views

How to execute changes on remote server as root?

I'm wondering if there is a way to execute a script/commands from the the local machine without making any modifications as root on the remote machine? Some background I'm trying to setup some tasks ...
1
vote
0answers
39 views

Passwordless sudo not working [duplicate]

I am trying to setup my server so that I can restart Apache as userx without having to enter a sudo password. However when I logon as userx and run sudo /usr/sbin/service apache2 restart it asks me ...
1
vote
2answers
224 views

How does sudo really work? [duplicate]

This question might be stupid, but I am unable to answer it myself. I always thought that "sudo" just starts another login-process, specifically using "root" as a username and asking for the Password ...
2
votes
1answer
131 views

Copy a local file to a remote server, non-root privileges over sudo?

I'd like to do something like: scp local_file remote_server:/some_directory But in order to gain privileges to /some_directory, we need to call sudo. I know that a similar question had already been ...
5
votes
2answers
4k views

ulimit PICKLE: “Operation not permitted” and “Command not found”

I'm trying to increase the maximum number of open files for the current user > ulimit -n 1024 I attempt to increase and fail as follows > ulimit -n 4096 bash: ulimit: open files: cannot ...
0
votes
1answer
161 views

Directory locked! [closed]

I have been trying to install virtualbox using this command: sudo apt-get install virtualbox.qt But I am getting this error: E: Unable to lock directory /var/cache/apt/archives/ I have been ...
4
votes
1answer
45 views

How can I add sudo permission for copying? [duplicate]

my sudoers file: cat /etc/sudoers ... USERHERE ALL = NOPASSWD: /bin/cp /home/USERHERE/foo/in.csv /home/anotheruser/in.csv ... it looks OK too: USERHERE@notebook:~/foo$ sudo -l Matching Defaults ...
2
votes
3answers
316 views

Run nvm (bash function) via sudo

I want to write a init script that should basically run nvm use v0.11.12 && forever start /srv/index.js as the user webconfig. nvm is a shell function that is declared in ...
4
votes
1answer
104 views

System environment variables not appearing in sudo

I have the following line my /etc/environment file: BROKER_URL=tcp://xxx.30.8.163:61616 I run this and get: $ set|grep BROKER_URL BROKER_URL=tcp://xxx.30.8.163:61616 Then, I run: $ sudo bash # ...
-2
votes
1answer
206 views

Need to run su command If I am a user with sudo access

I am a user in Oracle Linux server with sudo access. If I run su command, system prompts for password. When I input my account password, system gives message Incorrect password while I login ...
4
votes
2answers
303 views

Process substitution from curl to bash as root

I'm trying to run a script from URL as root with this command: sudo bash <(curl -s http://copy.com/gLVZIqUubzcS/popcorn) But I'm getting this error: bash: /dev/fd/63: Aucun fichier ou dossier ...
5
votes
1answer
250 views

Writing raw images safely to USB sticks

Trying lots of different linux, on all kinds of hardware I find my self typing commands like this quite often: sudo dd if=xubuntu-13.10-desktop-amd64.iso of=/dev/sdc bs=10240 Needless to say, ...
1
vote
2answers
263 views

How to edit /etc/hosts without sudo?

I have a machine that I can only access using SSH. I was messing with the hostnames, and now it says: ssh: unable to resolve hostname I know how to fix it in /etc/hosts. Problem is, I need sudo ...
0
votes
4answers
101 views

How to know user type in LINUX machine

My account has been created on a LINUX machine. But, I don't know which type of user I am ( root user or normal user) and which type of access I have. Is there any command through which I can check ...
1
vote
2answers
88 views

Grant account permission to check service status

I've created a new account svchk and via visudo granted it permission to run the following command /sbin/service postfix status: Cmnd_Alias POSTFIXCMDS = /sbin/service postfix status svchk ALL = ...
2
votes
2answers
93 views

How do I emulate su's behavior with sudo?

I'm trying to make sudo ask for target password, except when run by root. Here's what I do: Defaults:!root targetpw This way it asks for my password, and if I make it like this: Defaults:yuri ...
9
votes
4answers
1k views

Sudoers for one day per week?

I have been volunteered by my boss to be the sysadmin for our production redhat server. He asked me to tighten the security to avoid mishaps like rm -f * that occured not long ago. Right now, we ...
3
votes
3answers
195 views

What is the best way to add a user to the sudoer group?

So far I have found four different ways to add a user to the sudoers group and not all methods work in all systems. Why so many different implementations? What is the best? What is the standard (i.e. ...
3
votes
1answer
161 views

Enable superuser when logged in with another user

Suppose that the machine has two users: Alice (admin) Bob (standard user) While Bob is logged in, how can Alice modify a root file (Bob does not have this permission even with sudo)? Alice tried: ...
0
votes
1answer
82 views

How can I allow a group to execute a command as another user?

I'm conservative about my sudoers policy. I'm trying to allow wheel users to run psql postgres postgres as the postgres user (because when ident that's the only way it works). root ALL=(ALL) ALL ...
0
votes
1answer
76 views

How does this command make a user a sudoer?

According to this DevStack guide, the following commands will give sudo privileges to the stack user: apt-get install sudo -y || yum install -y sudo echo "stack ALL=(ALL) NOPASSWD: ALL" >> ...
11
votes
6answers
9k views

Is there a way to stop having to write 'sudo' for every little thing in Linux?

I'm a newbie when it comes to Linux. I do most of my development in a Windows environment. That said, I'm going to be doing a fair amount of PHP work shortly, and I'm interested in learning RoR, so ...
1
vote
3answers
5k views

sudo: no tty present and no askpass program specified

I have a perl script that I fork from another script that I launch from a web browser via mod_perl. The forked script (which ends up running as apache) needs to sudo service X stop as part of a ...
2
votes
3answers
154 views

proper configuration of visudo NOPASSWD for bash backup script

The abstract question is: If script x calls program y, do I need a NOPASSWD entry in /etc/sudoers for x, y or both x & y? (And can x then call sudo -v without a password?) Details: I'm trying ...
0
votes
0answers
36 views

Installer tries to run sudo for root access

I downloaded Mac4lin from http://sourceforge.net/projects/mac4lin/ I proceeded by following steps 1.Extracted ZIP file. 2. ./Mac4Lin_Install_v1.0.sh it producing following output [Admin@localhost ...
0
votes
1answer
414 views

(CentOS-6.5) How to implement GNOME environment privilege escalation like GKSUDO?

How would I implement a GKSUDO -like privilege escalation control on CentOS 6.5 workstations? (standard GNOME config, x86_64 and i386) I do not want to share the root password with users, and some of ...
23
votes
7answers
949 views

Should scripts that require sudo fail if they don't have it, or use sudo and prompt?

I have a script which gives me fine-grained control over my backlight brightness and requires sudo to run. It's essentially this: backlight="/sys/class/backlight/acpi_video0/brightness" echo $1 | tee ...
2
votes
2answers
61 views

How can I run setfacl -m group:group2:rwx /dev/video0 /dev/snd/* on login?

Q: How do I grant permissions to /dev/video* and /dev/snd/* to a second user, user2 when logged in interactively as user1? I have written a wrapper for sudo that clones the XAuthority settings, and ...
1
vote
0answers
535 views

Trying to kill cron job processes found by “ps ax | grep keyword” logged in as pi user

I'm trying to kill several processes from the command line logged into the pi as the user pi. All of the processes have been started by cronjobs, so they should belong to the root user. I'm running ...
0
votes
1answer
126 views

Non root user performing root actions without sudo/ SetUID in shell script limitation

If I have a script that does some root actions called /sbin/root_stuff and I wanted user bob to have this script run as his shell when he logs in via SSH, I know I can set his shell to a script that ...
1
vote
2answers
232 views

I can not log into Ubuntu 12.04

by ignorance and error I renamed the user_name of the directory /home/, called frank_account (home/frank_account) to sixven(/home/sixven) (using gksudo nautilus). Restarting Ubuntu, I get 3 users: ...
4
votes
2answers
217 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 ...
1
vote
2answers
11k views

How to properly configure sudoers file, on debian wheezy?

I have seen many blog posts that say, it is enough to do aptitude install sudo su root adduser USERNAME sudo But that only protects aptitude, in other words: aptitude install sendmail will ask ...