sudo - Execute a command with superuser privileges.

learn more… | top users | synonyms

0
votes
1answer
45 views

How do I edit sudoers file in fedora? [duplicate]

I have just started a new fedora build. I just got things going, and was about to install tmux, and was hit with the message... Error: This command has to be run under the root user Ok. I attempt ...
1
vote
2answers
40 views

Reason for requirement for root for package management

In package managers like pacman and apt, the root check is hard coded into source using guid checks. Why is this? A non privileged user can compile a program - let's say chromium browser - from ...
0
votes
1answer
44 views

To wget as New User without sudo in Raspbian

I have a new user masi in Raspbian Jessie. I want that it has access to /usr/bin/ etc wget. I did sudo adduser masi sudo visudo root ALL=(ALL:ALL) ALL masi ALL= NOPASSWD: ALL % ...
0
votes
1answer
46 views

Is it safe to uninstall `su` in favor of `sudo` to harden Arch Linux? [closed]

Is it safe to uninstall su in favor of sudo to harden Arch Linux? Have you got an opinion on whether this is a good or bad idea? I read the Arch Linux Wiki articles Security, Su and Sudo. I also ...
0
votes
1answer
32 views

alias pip to sudo pip

When using pip I almost always use sudo because otherwise it lacks permissions. I plan on adding an alias pip="sudo pip" in my .zshrc file. Is there a reason I shouldn't do that? The main issue I can ...
1
vote
1answer
37 views

`sudo -u user script` does not even have access to /bin/sleep

When running the script bla with sudo -u otheruser ./bla I get an output indicating that this script is run such that no external commands are available: otheruser ./bla: line 3: /bin/sleep: ...
4
votes
1answer
988 views

How to add myself to sudoers when I have no root access on my debian machine?

I've gotten myself into a weird situation. I just installed Debian on a virtual machine I made so that I can ease into it before I try dual booting. I went through all the set up, and as a test to see ...
0
votes
0answers
15 views

notify-send not showing when executing with sudo [duplicate]

In short: I have a scripting finding, fixing and mounting a partition, thus this needs sudo / su permissions. System: Gnome 16.04 - amd64 notify-send "a message" shows a notification as expected, ...
0
votes
1answer
29 views

2 factor login for gui and ssh imposes verification for sudo use

tldr: how can I make it so I don't have to use a verification code to sudo? Hello, I followed this guide on how to setup 2 factor login for my debian install. I have it so when you try to login ...
2
votes
1answer
51 views

Forwarding X-windows through a su - session

I'm trying to forward my X windows, but seems to be limited to just on session? What I'm trying to do is invoke x-applications as another user, through a sudo su -. If I know the other user's ...
1
vote
3answers
51 views

Does it make sudo more secure when indexing all commands by their SHA-2 checksums?

I'm asking myself whether system security substantially increases when I generate a security policy, i.e. sudoers file which contains one or more Cmnd_Alias definitions that enumerate all executable ...
0
votes
3answers
63 views

I'm a sudoer and also NOT in sudoers file somehow?

I'm trying to run sudo apt-get update. I will paste my last output from me trying to 'add' myself to sudoers file (which I figured I was on, but kept getting errors saying I wasn't...) timothy@AMDx6:...
1
vote
1answer
74 views

What to do if the owner of /usr/bin/* changes to a non-root?

It would be the right thing to say that I messed up! Accidentally, I changed the owner of all files in /usr/bin to 'dev' from 'root'. Now, sudo does not work! If I use sudo with any command, I get - ...
0
votes
1answer
37 views

How to forbid ssh connection after sudo -u

After ssh login, user with UserName makes $ sudo -u localusername -i and $ ssh localusername@someserver How to forbid ssh localusername@someserver for UserName via sudo -u localusername but permit it ...
0
votes
1answer
21 views

Default audio (Pygame.mixer and alsamixer) doesn't work when using sudo

I have a simple python file which plays a sound: #sound_test.py import pygame #init sounds pygame.mixer.pre_init(44100, 16, 2, 4096) pygame.init() pygame.mixer.init() WAV = pygame.mixer.Sound("...
2
votes
0answers
28 views

Override local sudo defaults using sss or ldap

I'm trying to to configure an IPA domain to use the following sudo options for a specific command group: !authenticate !requiretty visiblepw Locally, the following defaults are set in /etc/sudoers: ...
1
vote
1answer
17 views

Setting nano cursor using mouse via putty doesn't work if sudo

I needed to be able to set the cursor using mouse when editing text via nano over putty. I have already set the below in ~/.nanorc: set mouse If I start nano file just like that then it works, but ...
0
votes
1answer
42 views

su to a specific user only if requesting user is in a specific group

I need to know how to set up a control user that a user can sudo into only if the user is in a certain group. For example, stupid is a control user that interacts with a service, and is in the group ...
0
votes
2answers
80 views

How to get sudo access without reboot? (on remote server) [closed]

(From remote Debian server) When you give sudo right with visudo for the first time on first boot to a new user, su - <newuser> will not be enough to offer the right to use sudo and then reboot ...
18
votes
2answers
2k views

Can I customize the sudo “this incident will be reported” message?

Is it possible, on Linux or on BSD systems, to customize the sudo "this incident will be reported" message? I've gone over man sudo and man sudoers on an Ubuntu 16.04 machine, a FreeBSD 10.2 machine, ...
2
votes
1answer
57 views

Prevent sudo user access to specific folder and files [duplicate]

How can I restrict sudo access to a specific user in the /var directory or its contents?
0
votes
0answers
24 views

authenticate commands using pam module

This is weird requirement i am not sure possible or not but we have Centrify running in our environment which use dzdo instead of sudo Now i have requirement to ask password for specific command, do ...
0
votes
1answer
30 views

Now visudo won't work at all

RHEL 5.10 When I do visudo I get this error: chuck 75->visudo visudo: /etc/sudoers: Permission denied visudo: /etc/sudoers: Permission denied Listing of sudo exe file and /etc/sudoers: chuck ...
3
votes
1answer
153 views

RHEL sudo still not allowed for user 'tina' [duplicate]

I'd like 2 users, 'tina' and 'lu' to execute a few utils like /bin/chmod. Here's the relevant portion of my /etc/sudoers file. tina,lu ALL=/bin/chmod /bin/chown /bin/chgrp Then I logged in as ...
1
vote
1answer
67 views

RHEL How to login as different user from shell?

Redhat Enterprise Linux 5.10 (No we can't upgrade.) This is related to my other question. I would like to be able to login as another user, like 'tina', so I can test her sudoer permissions. My ...
1
vote
1answer
70 views

Does user have to logoff then back on if I change /etc/sudoers?

Redhat Enterprise Linux 5.10 (No we can't upgrade, please don't ask.) I have a user, 'tina' who is logged into the system. I need her and user 'lu' to use chmod, chgrp, and chown commands for certain ...
4
votes
1answer
45 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 ...
1
vote
0answers
14 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. ...
0
votes
1answer
33 views

How to delete password for current account

I just installed Ubuntu 15.10 on my new desktop. However, I want to erase the password of it. I followed the instructions here. I now can successfully login with out password, but I cannot use sudo ...
0
votes
2answers
130 views

Why did sudo not work in CentOS? [duplicate]

I am using Centos and want to use sudo command to run as root. But after input the root password, it always prompt to ask me input the password again. I am pretty sure the password is correct since I ...
0
votes
2answers
63 views

Can we install a package through a shell script? [duplicate]

I'm trying to write a shell script so that when I reinstall my Ubuntu again. I could just run script and retain all the packages. And I'm planning to pass password in form of argument. My question ...
0
votes
1answer
59 views

Running .sh Script With Sudo Results In Different Output

I'm seeing some really strange behavior in a script I'm working on.What I have is an svn hook that gets run whenever a commit is made to an svn repo. It runs a sqsh command that generates another ...
1
vote
0answers
28 views

Why does visudo compare the contents of `VISUAL` to a fixed whitelist? [duplicate]

This is on Ubuntu 15.10 I'm trying to get a better understanding of visudo and how it works. The documentation explains that visudo will consult the VISUAL environment variable and compare it against ...
1
vote
1answer
118 views

sudo: unable to resolve host “hostname”

I'm testing a VPS provider, and recently created a virtual machine with a hostname testserver using an ubuntu template. This VPS provider reserves and bills resources by the month, so if you create a ...
1
vote
2answers
157 views

Failed to open config file '/dev/fd/63', error: No such file or directory for wpa_supplicant

When I do this: sudo wpa_supplicant -D nl80211,wext -i wlp4s0 -c <(wpa_passphrase "some ssid" "password") I get Successfully initialized wpa_supplicant Failed to open config file '/dev/fd/63', ...
0
votes
1answer
174 views

what is meant by Defaults:visiblepw in /etc/sudoers file

Im newbie to linux, when i was reading sudo config file, there is a line Defaults visiblepw . i read the definition for the visiblepw in manual page visiblepw By default, sudo will refuse to ...
0
votes
0answers
38 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 ...
5
votes
4answers
878 views

Allow user to run a command with arguments (which contains spaces)

I want to allow one user to run grep (through sudo), and to grep for one specific string in one specific file. I don't want to allow this user to be able to run grep on all files. The user doesn't ...
3
votes
1answer
37 views

How to temporarily change locale for sudo?

To change the locale of the current user like export LANG=en_US.UTF-8. But this environment variable doesn't affect the root user. When I use sudo the display language remains default. How can I ...
3
votes
2answers
44 views

Feedback when entering passwords, without revealing length

I often SSH into a machine and use sudo on it. When entering passwords, I'm always afraid that another window will steal the focus. However, I don't want to display asterisks (with pwfeedback, for ...
0
votes
3answers
98 views

I want to copy a remote txt file via SSH, but without using root access

I want to copy my hosts to remote /etc/hosts but it doesn't work. I know root SSH access makes things easier, but IMHO root SSH access is a little dangerous. cat /etc/hosts|ssh samba2 "sudo su -c "...
0
votes
5answers
142 views

copy file from user to another in linux

I'm trying to copy a file from my home directory to another user's directory. I have a sudo access for the other user with no password. I tried doing something like: sudo secondUser cp /home/...
0
votes
1answer
36 views

How can I avoid being prompted for a password in this script? [duplicate]

I’m using Amazon Linux. If I login as my “otheruser” user, and create a script, test.sh, with this text sleep 5 ; sudo reboot now I can login and run the script like so … [davea@mydevbox ~]$ sudo ...
1
vote
2answers
98 views

What does “sudo su -s /bin/bash - <username>” do?

Could someone kind enough explain to me what this command means? sudo su -s /bin/bash - foo I was told that if I want to switch to a different account in this case "foo" without knowing its ...
2
votes
1answer
37 views

Exporting a variable so it appears in a script sourced through sudo

I have a bash script/s which has a "main" script which is run as sudo. Variables are declared in this script. Then it sources another commands.sh script, however this script uses sudo to drop back to ...
1
vote
1answer
39 views

Pass Environment Variable to Sudo AWS ec2 sudo node

I am new to linux and AWS. I have a node.js server running on an EC2 instance. I am running the following command to keep it running endlessly and on port 80: $ sudo node app.js & Now when I ...
1
vote
0answers
24 views

How does shutting down require sudo except when done through a GUI? [duplicate]

If I want to shut down my machine programmatically or on the terminal, I must do sudo poweroff or sudo shutdown. If I want to shut down my machine through my window manager and desktop environment, I ...
5
votes
6answers
743 views

What is the threat of a user trying to sudo without permission?

I was sshing into a certain computing system that I use. I was trying to follow some Linux instructions that involved sudo, and tried a few times to enter the password unsuccessfully, before realizing ...
1
vote
2answers
69 views

Why when I try to execute a program as normal user I get denied, and when I execute it with sudo I get “Not Found”

In order to execute mysqlbackup I have to execute it as root. Here's the example when I execute it as normal user: mysqlbackup --compress --user=root --socket=/var/lib/mysql/mysql.sock --backup-dir=...
0
votes
1answer
112 views

How can I execute any command as a normal user without sudo?

Is it possible to assign the sticky bit to sudo in order to execute any command as a normal user? Let's suppose that we have the user test and then: test@test$ apt-get update But I don't wanna use ...