The sudo command is a program for some Unix and Unix-Like operating systems, that allows a user to execute programs with the security privileges of another user. Typically those of a superuser or the root user.

learn more… | top users | synonyms

0
votes
0answers
5 views

notify-send with sudo not showing any notifications

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" that shows a notification as ...
1
vote
2answers
21 views

Non-root user having /root as $HOME

I have the following entry in /etc/passwd file: daemon:x:2:2:daemon:/sbin:/sbin/nologin However, when I sudo -su daemon the $HOME seems to be set to /root: [root@sbecby07 ~]# sudo -su daemon 'echo ...
1
vote
2answers
37 views

Custom script run with sudo - command not found

Problem: Running a script as sudo returns sudo: mount-remove-hiberfile: command not found Info: Scripts folder: '/scripts' (all my custom scripts are kept here) My User: 'cybex' ...
3
votes
3answers
67 views

What is the difference between adding a user to “sudoers” vs “root” group?

I have done some research and in order to allow the user to use the sudo command, you must add them to the "sudoers" group. This gives them root privileges as long as they enter in root's password. ...
0
votes
0answers
19 views

How is rooting done under the hood? [migrated]

I recently rooted my device which got me curious regarding the process. I would really like to understand how rooting applications work under the hood. Articles I have found over the internet have ...
2
votes
1answer
28 views

Why am I able to switch user only using hyphen?

If I try to switch the user using sudo su - kshitiz it works, and doesn't ask me for any password. But if I do sudo su kshitiz it asks me for that user's password. Why is this? I understand that ...
0
votes
0answers
12 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 ...
0
votes
0answers
6 views

Why can I not view the /home folder as a regular user in Centos?

I'm on Centos 5 and I'm trying to view the /home folder with my regular user account. I have sudo rights I added my user to the same groups as my root user, but I still don't get permission to view ...
0
votes
1answer
14 views

Why is php cgi loaded in path when doing a 'sudo su <user>" vs just being logged in which uses php cli?

When logged in as root user, php loads the correct version which is php cli. But when i do a sudo su < user >, php is is loading the cgi version which is breaking some of my applications that ...
0
votes
1answer
21 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
0answers
13 views

how to switch from sudo mode to normal mode for system installation script in python

I want to automate installation of mongoDB,meteor etc in python on centOS and at some point I want to switch to normal user. tried several codes which are given below but none works,also I need proxy ...
0
votes
0answers
12 views

How do I avoid getting prompted for a password when I run this script?

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
1answer
32 views

Automating SSH login gives unresponsive remote-shell, dropping back to client-terminal (without errors)

I have a problem with the tool expect under Ubuntu 14.04 LTS. I want to automate ssh logins to some Sophos UTM Firewalls and evelate my rights directly after with "sudo su -" and the correct password. ...
0
votes
1answer
27 views

Authentication for root process not showing all users

I have 2 linux machines, 1 VPS and 1 raspberry pi Problem: When calling a root function e.g. service "a service" restart both these cases appear different. Some users do not show as possible auth ...
0
votes
1answer
59 views

how can I get higer privilages on linux [closed]

I would like to get higher privilages on my linux computer (I dont have any admin privilages and cant use sudo/su).I would like to get privileges of a root and privileges of file owner. how can I do ...
1
vote
1answer
27 views

What does single user mode in Linux/Unix means and how is it different from Safe mode in Windows

What is Single User mode used for? Can it override the root Password? Do you need a password to acces the SU mode? In a normal session when you run SU command does it stands for Single User or Super ...
0
votes
1answer
39 views

how to solve error sudo command is not found?

I want to install a game in Windows using Cygwin. When trying to use the sudo command, I receive the following error: -bash:sudo:command not found I get a similar error when trying to use command ...
-2
votes
1answer
38 views

How do I overcome my permission denied error when running with sudo?

I’m using the following version of Linux … [davea@mydevbox ~]$ uname -a Linux mydevbox.evo-text.com 4.4.5-15.26.amzn1.x86_64 #1 SMP Wed Mar 16 17:15:34 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux I’m ...
0
votes
0answers
14 views

sudo-users Executing and Runnning Commands Recursively

I would like to give a specific user the ability to run and execute commands recursively for a given directory and his subdirectories but only specify the top level directory in the sudoers file. ...
0
votes
1answer
22 views

Why strace sudo command bombs when sudo command works?

my username is allowed to execute sudo command then why does this bomb strace sudo command with the error: sudo: must be setuid root
1
vote
2answers
70 views

Why does a simple user password allow root access on Ubuntu?

I have a client who I setup with a linux machine. He isn't very tech savvy, and obviously just needed a simple password to log onto ubuntu with. His username and password are something like: user: ...
1
vote
0answers
17 views

Sudo user is not able to export path of ant

Sudo user is not able to export path of ant. I am trying to execute shell script setpath.sh which exports path for ant. After executing the script when I am executing ant command then getting ant ...
1
vote
1answer
74 views

I am getting “ln: /usr/local/bin/<Cask>: Permission denied” when trying to install some casks

I have installed Homebrew and Cask to my machine, and it has worked for some things. But I sometimes get an error saying ==> ln: /usr/local/bin/<Cask name>: Permission denied Error: Command ...
3
votes
3answers
30 views

sudo via cron'ed ssh works in RHEL6 but not in RHE7 (/dev/tty: No such device or address)

I give up: I have a cronjob script that Ive been running for years (out of a RHEL 6.7 machine) to remote into other RHEL machines via ssh. Works flawlessly against RHEL5 and 6 but fails against ...
1
vote
1answer
37 views

Linux - create screen as another user

I'm trying to create a new screen on my server (CentOS 5.11), but instead of starting it with my user, I would prefer to use another user with restricted permissions, just to be on the safe side. So, ...
0
votes
0answers
27 views

Have I messed up Time Machine backup?

I recently had a full power outage which happened in the middle of a Time-Machine backup to a Time Capsule on my network over WiFi. I've only recently got and started using the TimeCapsule device but ...
0
votes
0answers
39 views

“fork: Resource temporarily unavailable” from git in MacOS El Capitan

Sometimes when I am using Git and cannot do a sudo command, it reports fork: Resource temporarily unavailable What does this mean, and what should I do about it?
1
vote
2answers
86 views

Running script that has sudo commands with sudoers

I wrote a script that helps clean up my downloads and anime, but it won't run without root. So I tried adding it to /etc/sudoers (edited using techraf's suggestions): # This file MUST be edited ...
0
votes
1answer
48 views

systemd create root service

I need to create a systemd service to start some owfs-daemon automatically. I can manually start the daemon with sudo /opt/owfs/bin/owfs --i2c=ALL:ALL --allow_other /mnt/1wire/. Then there are ...
0
votes
0answers
24 views

rsync via sudo user using ssh not working

I logged in as USER1 and I am trying the below one from shell script. rsync -v -p -t -e "sudo -u USER2 ssh" USER2@HOST2:${REMOTE_FILE_TO_MOVE} \ ${DESTINATION_PATH} It prompts password for USER1 ...
1
vote
0answers
87 views

Set Locales on Ubuntu

Greetings: I want to set locales in Ubuntu. It currently has en_US.UTF-8 and I want to change it to es_ES.ISO-8859-1. I added the locale by entering the command sudo locale-gen "es_ES.ISO-8859-1" ...
2
votes
1answer
83 views

How is WinSCP able to provide a sudo user for executing scp?

The tool WinSCP is able to perform a sudo on the remote machine to perform the scp as the sudo user. That leads me to think that this must be possible with the command-line version of scp as well. ...
0
votes
1answer
47 views

What does “sudo /bin/ls %s %foo” mean?

I am trying to understand the above command. sudo /bin/ls %s %file_path What is does % do? Is it some kind of substituting mechanism? What does sudo /bin/ls do?
0
votes
1answer
31 views

How to enable user to change iptables rules?

I am currently developing an application that can automatically run commands in multiples servers. If I change a service configuration I need to restart (or reload) it and thus, some of the commands ...
1
vote
1answer
149 views

Nautilus not working on sudo

I've got Trisquel 7 GNU/Linux distro, with GNOME 3.8.4. I'm finding impossible to create a folder in Nautilus, or drag and drop files into the Desktop, out of other options. I find this quite ...
0
votes
0answers
35 views

How to automount in ChromeOS? Biggest partition not mounting at startup on my Chromebook

I was pretty excited to realize there's a Chromebook tag on here on SuperUser, very cool! Not finding this answer on SO or SU or after a lot of Googling. Question is: My biggest partition (9Gb) ...
0
votes
1answer
61 views

Corrupted sudoers file preventing me from using sudo

I attempted to add another user to the sudoers list on my Raspberry Pi running Debian (Raspbian Jessie kernel ver 4.1). While doing so I entered the entry in wrong and I keep getting these errors ...
0
votes
1answer
58 views

Is there a way to set up a warning before executing some commands in the terminal?

There are some terminal commands that are proficient at destroying large swaths of data very efficiently. Like: sudo rm -rf /* or rm -rf /*. I want to set up a warning that will show up, whenever ...
2
votes
2answers
42 views

How to sudo using another user's account password from a script?

I have a bash script running as user, a user account with no evaluated privileges. The machine has a second account admin which has sudo privileges. There is no root password set. The script knows ...
0
votes
1answer
44 views

sudo ssh-add /root/.ssh/id_rsa return error

I m trying to save ssh authentication with the command ssh-add for sudo usage: linux$ sudo ssh-add /root/.ssh/id_rsa Could not open a connection to your authentication agent. but as indicated it ...
-1
votes
1answer
111 views

WinSCP/PuTTY: Cannot move file on server via sudo: Permission denied

I have uploaded a file to a remote Linux server. current directory is: /home/user/file.war Now i want to move the file into tomcat webapps folder and overwrite the existing version: The directory ...
1
vote
1answer
65 views

Have output of 'sudo' script printed to same Powershell window?

I found this 'sudo' script online: function Elevate-Process { $file, [string]$arguments = $args; if([System.IO.File]::Exists("$(get-location)\$file")) { $file = ...
0
votes
1answer
86 views

Error executing remote commands with ssh using sudo user

The following command is failing: ssh -t user@server-01 sudo -iu suser "cd /opt/jboss ; ./portal.sh stop" I getting: bash: ./portal.sh: No such file or directory How can I change directory ...
1
vote
2answers
183 views

Problems with sudo privileges as admin in OSX

I am a admin on my Mac with OSX and I have enabled root user. When I try to use the terminal without typing sudo it does not seem to recognise my privileges as an admin, but it works fine if I type ...
3
votes
1answer
168 views

Add user to SSH group safe?

I want to control who can log in via SSH on my server. Is it safe to add the group 'ssh' to the users who are allowed to login in? I see some distros use system groups in the user's ID and others ...
0
votes
1answer
98 views

sudo to any user without a password

If sudo can be configured to no password such as: bob ALL=NOPASSWD: ALL Then how can you configure sudo to be able to sudo to any user without password ? So that sudo -u domainnameuser.com mkdir ...
0
votes
0answers
49 views

Subversion sudo svn update changes file ownership and rwx

I'm limiting permissions on a certain file, settings.py in my svn-linked directory so that it can only be read by sudo users and apache, which goes by the username, www-data. So, on settings.py, I've ...
1
vote
0answers
20 views

Run script as certain user — depending on group membership

I'm trying to run a script which calls another server through SSH (through Pub/Priv key). However depending on the user (or better said, his/her group membership) who runs the script through sudo, I'd ...
1
vote
1answer
45 views

What other than login and sudo is a Linux password for?

I've got a Linux development machine on which I've given some people key-based ssh access (password login is disabled). The users I've given access do not have sudo rights. So today I was wondering, ...
1
vote
0answers
22 views

Stuffed up sudoers file

I have managed to stuff up my sudoers file and am locked out of my server. Is there any way to get back in? To be precise, I have a single user (call her jane), who used to have sudo privileges for ...