Questions tagged as ['sudo']

Questions related to the sudo command that allows users to run programs with the privileges of a different user (normally the root user).
Score: 0
YoomarXD avatar
How to >> as sudo?
cn flag

I am trying to understand why this simple command does not work.

sudo echo "a" >> /var/log/a.txt

It returns.

-bash: /var/log/a.txt: Permission denied

But I do have permission to rw by other means, for example editing it with nano

sudo nano /var/log/a.txt

or by being logged into root

sudo su -
echo "a" >> /var/log/a.txt

How can I "apply sudo" to >>?

Score: -2
Pro_Inkling avatar
How do I get sudo or admin permissions without using the password
fr flag

My old computer had linux on my old computer and I had a friend that went into the grub menu and did something and that gave me administration permissions. Lately that friend has not listened to me at all and won't do it again so can someone show me a tutorial on how to do that. It would be GREATLY appreciated. Pls HELP.

Score: 0
NaterGamer avatar
Steam may not run: libc.so.6
ve flag

I am trying to get steam to work on my chrome book but whenever I try to start it says "You are missing the following 32-bit libraries, and Steam may not run: libc.so.6" im pretty sure that i might have deleted a file with the same name. how do I fix this?

Score: 0
eisha latif avatar
Errors and issues when install G++ on Ubuntu
in flag

Trying to install g++ when I run into this error:

$ sudo apt-get install g++
[sudo] password for eisha: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
 ...
Score: 2
ismail k avatar
An upgrade from 'groovy' to 'impish' is not supported with this tool
jp flag

This is the error when I type do-release-upgrade:

enter image description here

Error is An upgrade from 'groovy' to 'impish' is not supported with this tool.

Make sure that I did

sudo-apt-update   
sudo-apt-upgrade  

sudo sed -i "s/old-releases/archive/g" /etc/apt/sources.list /etc/apt/sources.list.d/*.list
Score: 0
Rafael avatar
group of users to run a systemctl service without sudo and passwd
de flag

I would like to grant permission to a group of users to run a systemctl service that only sudo users can executable.

I put the etc/sudoers (visudo) command below and it works:

%group_a ALL=(root) NOPASSWD: /bin/systemctl enable --now app_xxx@user_01

But would it be possible to pass the $USER environment variable as below?

%group_a ALL=(root) NOPASSWD: /bin/systemctl enable --now app_xxx@$USER

I tried t ...

Score: 0
Liwinux avatar
always ask for sudo password when rebooting/shutdown the system
es flag

So,

I noticed that on manjaro, if there is only one user, typing reboot without sudo, will just fail and ask for the sudo password, whereas on ubuntu server, typing this doesn't ask for the sudo password and successfully reboot the system. My question is how can I make it so that when I type reboot/shutdown/halt, ubuntu always asks for the sudo password even if there is only one user currently logge ...

Score: 0
Ubuntu 20.04 (on HDD) - Do Not Disurb is not turning off, PrtSc and Firefox are unable to save files due to disk being write protected?
cn flag

Do-not-disturb button has stopped working once I turned it on. This is true for both the desktop bar, and inside the settings. Firefox says "the disk/folder/... is write protected, please choose another folder or make the disk writeable" (which it doesnt let me choose)

I guess all the above issues root from the same cause, since they all started at the same time. I am unable to share screenshots  ...

Score: 2
`sudo visudo /etc/hosts` gives syntax errors
mx flag

Really dumb question, Ubuntu 20, and I have apache2 installed, not much else. I go sudo visudo /etc/hosts and want to add an alias "dummy.com" domain alias as a hack to point to the server for local only testing a learning site and I get this unusual

>> /etc/hosts: syntax error near line 1 <<<
>>> /etc/hosts: syntax error near line 2 <<<
>>> /etc/hosts: syntax err ...
Score: 0
Allow a Python program run without root privileges to restart Elasticsearch
tr flag

There are a few suggestions out there with clues about how this might be achieved. It seems to me that the restart command of Elasticsearch shouldn't need root privileges, at least in my use case.

Basically, in case the ES service stops I don't want the user of the program to have the responsibility of restarting it, and the program, after detecting that the service is inactive/dead for some reason, sho ...

Score: 0
Ahdee avatar
Two password one login and one sudo but under the same account?
cn flag

I have a laptop that has a really complicated password, however I don't want to keep typing this in during procedurs that requires sudo. Can I have another more simple sudo password after logging in for routine stuff? Is this a security risk? thanks.

Score: 0
GC 13 avatar
How to give general user access to specific programs that required root access?
us flag

I have installed few programs as root (lets say program A, B and C). In order to run them, it will require root access. I understand that by adding those users or the user group to sudoers list, it will allow access to those specific programs.

I would like to limit access to programs A, B and C only and not give full sudo access to general users. How can I achieve it?

Can I give select sudo access t ...

Score: 1
CasualUsers avatar
Nodejs appear installed but "--version" is not working. On Ubuntu 20.04 LTS
in flag

I am having trouble in installing nodejs, npm and a specific version of angularCli. THe problem is that nodejs appears installed when I use the command

sudo apt install nodejs

but appears not installed when I check for the version. By using the command which, I am not finding any of nodejs, npm or ng

Like I am showing in the screen.

Score: 0
Pierre C avatar
Keyboard and mouse not working when using X11 and sudo
br flag

I can connect to my server with ssh and launch graphic applications (like sublime). When I want to modify a system file, I use a command like sudo subl /etc/fstab

Sublim runs but I can't do any action : typing, access menus, not even close the window.

The issue is not specific to sublime, I run Ubuntu 20.04.3 LTS and the is no problem when I'm not under sudo. I'm connecting from windows 10 with moba ...

Score: 1
Mj Ebrahimzadeh avatar
Can't build my react in ubuntu without sudo
ao flag

I have a react project and want to get a build. When I run

yarn

to install packages, it works fine and installs all packages. after I run

yarn build

, I get so many nonsense typescript errors like can't find react router type. Why is that? btw if I run

sudo yarn build

it works fine.

Score: 0
alchemy avatar
usermod: cannot lock /etc/passwd, but user is in root group which owns file
in flag

As the title says. Interesting behavior. I just switched over to nologin on root user for security, after adding my user to root and sudo groups. I added a longer sudo timeout as described in the link below. So I should be able to use usermod without adding sudo because root owns /etc/passwd and user is part of the root group..no?

https://unix.stackexchange.com/questions/26074/is-there-a-way-to-stop- ...

Score: 19
David Holland avatar
How do I prevent access to shutdown but not reboot?
in flag

I have a ubuntu pc running as a plex server. How do I get it so that no one can shutdown the computer but only allow the user to reboot the machine? I know it is possible in windows but I am just wondering if it is possible on ubuntu.

Score: 0
GuruRandapa avatar
Failed to start Celery Service
us flag

I am trying to daemonize celery on Linux. And after ironing out a lot of errors and reading through tons of configuration. I am unable to run Celery. I am running Ubuntu 20.04 and Celery 5.2+. Following is the error I get:

● celery.service - Celery Service
     Loaded: loaded (/etc/systemd/system/celery.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sat 20 ...
Score: 0
Active Directory Login from trusting domain
mp flag

I have 2 different active directories and 2 different domains.

Management domain: management.com Client domain: client.com

Trust relation one way, management.com able to manage client.com but client.com not able to manage management.com, that's exactly what we want to.

I have windows environments there and I am able to add domainadmins@management.com group to client.com membered Windows servers adminis ...

Score: 2
What's the difference between `#include` and `@include` in `/etc/sudoers`
in flag

I'm updating to Ubuntu 21.04 and apt wants to swap out my sudoers file with one where #include is replaced by @include. Is the old syntax deprecated? It's not something I seem to be able to google.

Score: 0
mehrdad avatar
Uninstalling nordvpn
in flag

When I run

sudo apt-get remove nordvpn 

and when I try

whereis nordvpn 

or

find -name "*nord*"

nothing shows up These commands are indicating that I don't have nord installed on my system, However every time I run

sudo apt-get update 

It will try to connect to nordvpn

[Connecting to repo.nordvpn.com (10.10.34.35)]

which is really annoying, any ideas?

Score: 0
Zorono avatar
Trying to tweak my sudo configuration
in flag

so I am trying to tweak my sudo configuration(sudo visudo -f /etc/sudo.conf) but unfortunately the following errors appeared ???

/etc/sudo.conf:16:22: syntax error
Plugin sudoers_audit sudoers.so error_recovery=true
                     ^~~~~~~~~~
/etc/sudo.conf:81:22: syntax error
Set disable_coredump false
                     ^~~~~
/etc/sudo.conf:123:41: syntax error
Debug sudo /var/log/sudo_debug  ...
Score: 0
Problems with sudo apt-get upgrade and sudo --fix-broken install and matchbox-keyboard
bw flag

I was trying to install omxplayer, and I was getting errors. I tried sudo apt-get update then sudo apt-get upgrade, but I get this error:

pi@raspberrypi:~ $ sudo apt-get upgrade  
Reading package lists... Done  
Building dependency tree... Done  
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.  
The following packages have unmet dependencies:  
 #lib ...
Score: 0
Kubuntu asking for user password not admin password
al flag

When I try running applications or using sudo in konsole, the prompt sometimes asks for the user password, and then responds that it's not a sudo or administrator password.

It used to only ask for an administrator password.

It does sometimes ask for admin authentication. Additionally, it won't let me download from discovery any more.

I created a new user to check and the new user works like my curre ...

Score: 0
thombrown avatar
I have succeeded in messing up /etc/sudoers and /etc/sudoers.d/sudoers. I can no longer access either of these files
cn flag

entering sudo in a terminal session, I get the following response:

>>> /etc/sudoers.d/sudoers: too many levels of includes near line 30 <<<
sudo: parse error in /etc/sudoers.d/sudoers near line 30
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

When I first installed Ubuntu 20.04, I also removed the login requirement for entering a password on  ...

Score: 0
blender987 avatar
user-name is not in sudoer file and su authentication failure
cw flag

when using sudo command, I met the error: "uers-name is not in the sudoers file, and this incident will be reported". And then I tried some answers in the internet, such as "su root " and so on and then I got the error"su:authentication failure". I knew there were many questions and answers about "not in the sudoers file" and "su:authentication failure" respectivley, but discussions are often like this: ...

Score: 1
Atduyar avatar
Deleted all users in WSL
nu flag

I use Wsl Ubuntu 20.04 LTS. I don't know why but all users were deleted. I created a new user. I wish I had not done

passwd:

tetemp:x:1000:100::/home/tetemp:

and now

$ adduser root
adduser: Only root may add a user or group to the system.
$ sudo adduser root
sudo: unknown user: root
sudo: unable to initialize policy plugin

I can't change passwd because it is read only.

-How can i get root back.

Score: 0
How to configure Hibernate button to not ask password for performing hibernate (for Simpler Off Menu extension for Ubuntu 20.04)
it flag

I configured hibernate as described here and installed Simpler Off Menu gnome-shell-extension with the help of this instruction. Hibernate button is working but every time requires password to allow hibernate. How to configure it to not ask password and perform hibernate right away like suspend button performs suspend?

Score: 2
Sandeep avatar
Selectively enable sudo without password
jo flag

On my Ubuntu system I followed the instructions for enabling sudo without a password.

It is working well, or should I say too well.

I have a couple of users, say userA and userB, who have been added to the sudo group.

sudo usermod -aG sudo userA
sudo usermod -aG sudo userB

I did sudo visudo and I added the following line at the bottom (i.e. the very last line):
userA ALL=(ALL) NOPASSWD: ALL

However, I ...