sudo - Execute a command with superuser privileges.

learn more… | top users | synonyms

5
votes
0answers
186 views

allow regular users to use network namespaces

I have an architecture using network namespaces (netns). I would like to allow regular users to do some operations in these netns. I could write a script netns-exec.sh, inspired by this post, ...
4
votes
0answers
571 views

How to enable `sudo` with custom functions?

Recently I learned you can enable sudo for custom aliases as follows: alias sudo='sudo ' # note: the space is required! The reason this works is the following: If the last character of the ...
3
votes
0answers
32 views

exists a “two-factor authentication” for sudo, if not how to make one anyway?

tl;dr normaly to gain root priviledges via sudo requires a special user account and the use of its passphrase as means to authetication. Due to keylogging/replay (in X.org session) attacks, I would ...
3
votes
0answers
827 views

How to disable sudo related logging for successful command execution under CentOS/Fedora?

You can disable sudo related log messages via adding something like Defaults:juser !syslog to our sudoers file. That is disabling logging to syslog. But under e.g. CentOS/Fedora there is an auditd ...
3
votes
0answers
3k views

How do I change file/directory permission of a nfs mounted directory, so I access files as user?

On a Ubuntu computer I mounted a directory from another computer using the following line in the fstab: 12.34.56.78:/space/Images /mnt/space/images nfs rsize=16384,wsize=16384,rw,auto,nolock 0 0 ...
3
votes
0answers
1k views

Security of xhost (local) and sudo xauthority forwarding

Context: launch a GUI application as a linux service. I considered making a headless daemon with a GUI front-end but there is too much code involved to do it now. This service must start on user ...
2
votes
0answers
10 views

Unable to get sudo lecture working on CentOS 7 server

I'm trying to enable the sudo lecture every time someone executes sudo, but I can't seem to get it working at all. I found a similar question here, in which someone states that if you don't see any ...
2
votes
0answers
33 views

How would I limit users' sudo permissions for journalctl to a specific unit?

I want to provide our users access to journalctl of a specific unit. For e.g., httpd. My initial thought was to specify the command spec like this: /usr/bin/journalctl -u httpd.service * This will ...
2
votes
0answers
245 views

No candidate version found for sudo

When I tried to install sudo in Debian 8.2 via aptitude install sudo I got an error: No candidate version found for sudo. The source list is standart. Here is the Source list: deb ...
2
votes
0answers
152 views

Security of sudo not asking for a password after the first time

After using sudo and entering a password to do so, sudo remembers that we have entered a password and we do not have to enter a password the next time we use it. I am concerned about the possibility ...
2
votes
0answers
206 views

How to specify regular expression for command arguments in sudoers

sudoers(5) manpage says that shell-style wildcards (aka meta or glob characters) could be used in command line arguments in the sudoers file. They are *, ?, [...] and [!...]. My idea is to use some ...
2
votes
0answers
543 views

Reading from /etc/environment with sudo

Using Ubuntu 14.04 LTS, I'm having a problem trying to read environment variables from /etc/environment when using sudo env. Basically, they are not being displayed. When I do just env, these ...
2
votes
0answers
294 views

What is the correct way to abort an operation from the sudo password prompt?

Sometimes it amazes me the "little" things I don't know about Unix. For years now I have occasionally noted that I don't actually know how to deal with the sudo password prompt cleanly. Every once in ...
2
votes
0answers
102 views

Why does xdg-open text_file differ from sudo -u me xdg-open text_file?

If I run the following command, the text file opens in my preferred editor (kate). $ xdg-open text_file However, if I try the following, where sparhawk is my username, I get several warnings, and ...
2
votes
0answers
280 views

PHP exec and amixer

I'm trying to make php lower the dB level of amixer using exec, but it seems like php isn't able to perform the task which requires sudo-access. What should be the best way to solve this? I tried: ...
2
votes
0answers
2k views

How to run ssh -t user@remote 'sudo nohup bash -c “comand”' in background

I want to run a script on a remote host with sudo privilege, someone suggests that I should use nohup and ssh -t, like the following command: The script ls; sleep 10; echo finish is crafted here to ...
2
votes
0answers
853 views

Sudo yum permission denied Fedora 17

On Fedora 13, in /etc/sudoers I used to have a line: Cmnd_Alias SOFTWARE=/usr/bin/yum and then for a user that would have the privilege of installing his/her own RPM packages, an entry like: ...
2
votes
0answers
264 views

gksudo not caching credentials

I've built a shell script for mounting ISO images in Nautilus, and it worked fine in earlier versions of Ubuntu. One of the many problems encountered in 11.04 is that gksudo doesn't seem to cache the ...
1
vote
0answers
6 views

RH software collections enable for command run with sudo

We are using RH software collections for python34 and have the following in /etc/profile.d/scl_enable_python34.sh source scl_source enable rh-python34 This works perfectly for interactive users. ...
1
vote
0answers
34 views

How to restrict su from root to nis clients

We are using NIS services for users login for Unix accounts. We have test machines where users themselves install OS and they get root access. Users are using su from root account to NIS user accounts ...
1
vote
0answers
54 views

BASH dd problem

i am trying to learn bash and now im trying to do a script for burning isos. I made the number "4" command to make sure the variables were right. the message i get when i complete my program and ...
1
vote
0answers
74 views

How can I switch from one user to another user inside a script?

.The issue is my id 'aaa' can read only the file name and not the contents inside it when I log in with my id "aaa". So to read the contents I have to switch to another user "bbb" which is having ...
1
vote
0answers
34 views

Galera + systemd: wsrep_notify_cmd fails with sudo (unable to change to sudoers gid: Operation not permitted)

We have a Galera cluster operational on CentOS 7 with sysv, and are looking into migrating to systemd. We are invoking a wsrep_notify_cmd to notify our application of changes in the node states, and ...
1
vote
0answers
39 views

Why does LXC-create returns error “sudo.conf should be 0”?

I try to create an unprivileged container and nothing works as expected. Here is my code : follows that tutorial #!/bin/bash sudo apt-get update sudo apt-get dist-upgrade sudo apt-get -y install ...
1
vote
0answers
31 views

Run mkvirtualenv command as another user

I want to run the "mkvirtual sth" but I have to run the script as superuser. sudo ./install.sh install.sh looks like this: # ... mkvirtualenv sth # su - geeret -c "mkvirtualenv sth" # (tried ...
1
vote
0answers
24 views

User can sudo although he is not in sudo group nor in /etc/sudoers

I have two colleagues on a Red Hat Enterprise Linux Server (release 6.4). Both of them can execute the sudo commands. Curiously, only one of the colleagues is in the /etc/sudoers file - let's call him ...
1
vote
0answers
95 views

Not permitted to add eth0 to bond0

I'm trying to add an interface to my bond0 but I always get the error. sudo ip link set dev eth0 master bond0 RTNETLINK answers: Operation not permitted I already tried it with sudo and with ...
1
vote
0answers
55 views

How to install framework on remoter server without root privileges

I'm trying to install caffe deep learning library on my university cluster grid running on Debian. The grid has some preinstalled modules, such as python, CUDA, compilers etc. The problem is, some of ...
1
vote
0answers
20 views

How do I escalate a signal?

For the past week, I been having a bug that my python code hasn't been doing a cleanup process properly. It was suppose to once it captures a signal caused by closing the terminal, it does some ...
1
vote
0answers
24 views

No drivers after usr ownership change Linux Mint

I have Linux Mint 14.2 installed on an IBM T60 ThinkPad. Everything was going just fine until I was installing some developer tool (I can't even remember which one anymore) and accidentally changed ...
1
vote
0answers
338 views

Ubuntu 14.04.2 LTS: for NIS users, SSH works but console login and sudo fail

I set up a fresh Ubuntu 14.04 LTS VM on VirtualBox and did an upgrade, so now I'm sitting at 14.04.2. Our office environment is NIS+NFS. I set up autofs and NIS, and confirmed that I can log in as a ...
1
vote
0answers
60 views

Allowing sudo kill for remote user for recovery purpose. Security implications?

I'm planning to create user allowed to SSH in and with right to sudo kill in case something disables local terminal/keyboard/display etc. Would probably add ps and/or htop to the list, as well. I ...
1
vote
0answers
37 views

gksudo not honoring configuration in /etc/sudoers

Some time ago I posted a question which was related to whether it is possible to preserve environment variables when sudoing to a different user. As it turned out, this is indeed possible. When ...
1
vote
0answers
980 views

sudo and sssd not working with user groups

Having a problem getting sudo that is integrated with sssd to work correctly when we use ldap to store the groups that have the different sudo privs. This works just fine if we have sudo set to go to ...
1
vote
0answers
67 views

Is it safe to disable password for a user, if it only uses SSH key login?

We want to remove the password usage on a UNIX system. The users should only log in with SSH key. Not password. So their password field in the /etc/shadow file will be "*" and set their password to ...
1
vote
0answers
307 views

gksu -S ask for password only once even when set to three times in sudo configuration

I have a problem with gksu command. It always ask for password only once even when I set Defaults passwd_tries=3 in /etc/sudoers file. Command: $ gksu -S --debug ls No ask_pass set, using default! ...
1
vote
0answers
5k 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 ...
1
vote
0answers
122 views

Is there a QT4 equivalent of gksu, not dependent on KDE libraries?

Is there a QT4 application with the same functionality as sudo to gksu that does not require an entire KDE desktop to be installed?
1
vote
0answers
81 views

can't access account with empty password

I used the passwd command to remove the password for my account. Now, when I try to use su to log in to my account, it won't let me enter an empty password. So now, I can't access my account. Any ...
1
vote
0answers
164 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 ...
1
vote
0answers
833 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 = ...
1
vote
0answers
369 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 ...
1
vote
0answers
771 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): ...
1
vote
0answers
886 views

Gnome update-notifier doesn't show updates when user not in sudo group (Debian Squeeze)

Gnome desktop notifications of new updates is not working on my system. I noticed that the notifications stopped working when I removed my desktop user from the sudo group (I prefer to have a separate ...
1
vote
0answers
668 views

Can't make a copy of /var/lib/mysql/ibdata1

I have a RedHat Linux server and I'm trying to make a copy of /var/lib/mysql/ibdata1, but I'm receiving an error saying permission denied and the file cannot be opened. I'm logged in as root user and ...
0
votes
0answers
15 views

kerberos: Why sudo command creates a ticket?

I have successfully set up a kerberos (MIT) / OpenLDAP debian server which can authenticate users with kerberos and get SSH access according to OpenLDAP groups. I must mention that as this is a ...
0
votes
0answers
41 views

Authentication required to edit Sudoers - User not listed

I made a small typo in my sudoers file, nothing a simple pkexec can't fix. The problem is that when I added my user with "adduser name" and added "name" to visudo, as well as the root and sudo ...
0
votes
0answers
20 views

sudo not working on two systems, but runs on remainder of the networked systems

This question is about sudo implementation and I was unable to find a similar question here in the forums. I'm running Redhat 6.6 on my network of 14 servers and 8 workstations. On the primary NIS ...
0
votes
0answers
28 views

Execute commands without sudo inside jenkins

I've imported a bunch of jenkins jobs and these jobs have a lot of shell script commands.There are no sudo before these commands.Jenkins has its own user.Is there a way so I can execute these commands ...
0
votes
0answers
69 views

Unable to su to any user as root on Red Hat 6.7 server

System: Red Hat Enterprise Linux Server release 6.7 (Santiago) I am trying to su to kms user(OS user) as root but i keep getting error saying You are required to change your LDAP password ...