Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
How can I configure Linux to see the prompt for the root password if Sam try to execute the following command: $ sudo mkdir /opt/test?
If Sam is part of sudoers, the terminal ask for the user password not for the root password.
In /etc/sudoers, add this line:
Defaults rootpw
Make sure you use visudo for editing this file. For more information, you can check the link
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
On my machine i'm getting "root#umar" that I want to change to "root#junaid". I have tried running different commands. They do change my username but above mentioned name is not changing.
See in above image. User I'm logged in as is "Junaid". But before that there is "root#umar" that I want to be changed to "root#junaid". Solutions I have tried change my current username that I'm loggedIn as.
Any solution?
"umar" is the hostname. So you should change it to get prompt like "root#junaid"
To do this on the fly you should exec next command:
sudo hostname junaid
sudo vi /etc/hostname
(to update the hostname there)
and the same in hosts file
sudo vi /etc/hosts
If you run commands as root you do not need to have sudo
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 4 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
When I try to use 'tail' command in a cloud server, I'm get a permission denied error:
$ ssh myUser#server
:~$ tail /var/log/syslog
tail: cannot open ‘/var/log/syslog’ for reading: Permission denied
How to get permission in tail command?
The file you are trying to read has permissions that disallow reading by any users that aren't part of the admin group.
Option 1: Run the tail command with the sudo command which escalates your access to root for the command that follows.
example
sudo tail /var/log/syslog
Option 2: Add your user to the admin group so that you don't have to sudo each time you want to read the syslog file.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I am trying to automate the build of my redhat server.
To add an existing user to sudoer:
Add user to sudoers file by using sudo visudo and add the following
line:
USERNAME ALL=(ALL:ALL) ALL
How do I perform above task using RedHat commands?
One way would be just to add username ALL = NOPASSWD:ALL to the end of /etc/sudoers.
echo "username ALL = NOPASSWD:ALL" >> /etc/sudoers
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I edited suders file with permission 440
testsudo ALL=(ALL) NOPASSWD: /usr/bin/adduser
but, when i use command
sudo adduser test
with user testsudo, linux ask me testsudo's password.
however, i edited suders file with testsudo ALL=(ALL) NOPASSWD: ALL
it works.
why?
Because it's
/usr/sbin/adduser
not
/usr/bin/adduser
But this really doesn't belong on SO. Voting to close.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have a regular username on a linux machine. I also have the root privilege. Today I found my username was deleted. That is, if I logged in as root and then ran
su myusername
The systems said "myusername" does not exist. I checked file /etc/passwd and "myusername" was not there.
My question is, is there anyway to find out who deleted "myusername"?
You might try something like this:
grep "deluser" /home/*/.bash_history /root/.bash_history