Questions tagged as ['sudo']
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 >>?
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.
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?
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
...

not working overlock. tried this article, without success nVidia RTX 3070 ETH overclock in Ubuntu20.04: nvidia-settings -a GPUGraphicsClockOffset/GPUMemoryTransferRateOffset not working
maybe something with a bunch of win10 + xrdp
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 ...
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 ...

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 ...

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 ...

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 ...
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.
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 ...
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.
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 ...
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.
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- ...
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.
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 ...

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 ...

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.
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?
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 ...

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 ...

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 ...
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 ...
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: ...
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.

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?
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 ...