Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi! Kindly advise why is my password [sudo] rejected ?
while trying to install a downloaded apps for debian
I have tried to key-in my sudo password in the terminal.
But it keep rejecting with the message "[user] is not in the sudoer file"
I have tried both the "root" & "user password" individually but the same rejection happens
What has happen?
Thanks for helping.
Last edited by handshake92; 04-06-2022 at 08:54 PM.
Distribution: Ubuntu based stuff for the most part
Posts: 1,177
Rep:
From the console run the 'groups' command to list all the groups the logged in user is part of.
If you see 'sudo' in the list then you have a problem with your password.
to evo-2 questions: No except for installing apps in the synpac repos.never temper with the system files
to frankbell suggestions: I have tried using su. It returns "root@desktop-QP:/home/stellar
to uteck suggestions: I type in "groups". It returns "root@desktop-QP:/home/stellar
What does it mean and what must I do now?
Thanks
Last edited by handshake92; 04-06-2022 at 09:57 PM.
to frankbell suggestions: I have tried using su. It returns "root@desktop-QP:/home/stellar
That is the "root prompt". In that state, you can install the package.
Quote:
to uteck suggestions: I type in "groups". It returns "root@desktop-QP:/home/stellar
You need to run that as your normal user. Ie before running "su". The output should be single line listing the groups you are a member of. Eg something like
Code:
stellar audio video
Quote:
What must I do now?
Depending on the output of the groups command, you may want to add yourself to the sudo group so that you can use sudo in the way most online instructions assume your system is configured. If so, we can tell you how.
It has changed "recently" (or at least it's an installer option now).
But the recommendation to use su instead still stands.
OP, please actually click on & read the links that are given to you.
That is the "root prompt". In that state, you can install the package.
>>> As I am a newbie to Linux and is my very first tinkering with Linux command line, kindly be forgiving & advise what is the package to install & where is the link?
You need to run that as your normal user. Ie before running "su". The output should be single line listing the groups you are a member of. Eg something like
Code:
stellar audio video
>>> Not quite clear on this- what is the command to use?
Depending on the output of the groups command, you may want to add yourself to the sudo group so that you can use sudo in the way most online instructions assume your system is configured. If so, we can tell you how.
>>> where do I begin, to add my user to sudo group
Evo2.
As others have mentioned you don't need to use sudo in Debian, you can run the commands as root (without sudo). But if you feel you want to configure it on your system, the following are the instructions I followed to enable it on my Debian system:
As others have mentioned you don't need to use sudo in Debian, you can run the commands as root (without sudo). But if you feel you want to configure it on your system, the following are the instructions I followed to enable it on my Debian system:
>> Well it did ask for password when I tried to install "Dolibarr.CRM"
that is when I keyed the correct password. It returns the following:
" [sudo] password for handshake92 - sorry try again. handshake92 is not in the sudoer file.
It is strange for every time when I login into Debian desktop pc, I keyed my user password -it is accepted and while using the pc it will ask for password "authenication is required to mount ST1000x-xxx (/dev/sb2) Administrator -which i did key in the password without any problem.
However when I tried to add my "handshake92 to sudoer as advised-using Debian's ISO image -Xterm" terminal app.. The error is always as follows:
-1.$ su, password xxxxxx.
su:authentication failure.
handshake92 is not in sudoers file. This will be reported.
-2.handshake92@Desktop-QP61AKG:~$ usermod -aG sudo handshake92.
bash:usermod: command not found
Kindly advised what must I do?
Thanks for helping.
Distribution: Ubuntu based stuff for the most part
Posts: 1,177
Rep:
That is odd. The command is in /usr/sbin/usermod so try the full path?
Since it looks like you can su to root, another way would be to su to root, then edit /etc/groups and add your user to the sudo group like so;
FYI debain does not include /user/sbin in a regular user's path which is why the OP sees the command not found error.
su switches to root but still uses the user's environment
su - switches to root but switches to root's environment too.
Yup, it was very annoying till I got used to always running su - instead of plain su.
Quote:
However when I tried to add my "handshake92 to sudoer as advised-using Debian's ISO image -Xterm" terminal app.. The error is always as follows:
-1.$ su, password xxxxxx.
su:authentication failure.
handshake92 is not in sudoers file. This will be reported.
-2.handshake92@Desktop-QP61AKG:~$ usermod -aG sudo handshake92.
bash:usermod: command not found
Kindly advised what must I do?
Try adding the user to the sudoers file:
Switch to root user and then:
Run 'visudo' (without the quotes)
Scroll down to the User Privilege section and add the following line:
Yup, it was very annoying till I got used to always running su - instead of plain su.
Try adding the user to the sudoers file:
Switch to root user and then:
Run 'visudo' (without the quotes)
Scroll down to the User Privilege section and add the following line:
Code:
handshake92 ALL=(ALL:ALL) ALL
Save and exit. You should now be able to sudo
>>> As advised,in XTerm app,I type in at handshake92@DESKTOP-QP61AKG"~$ su, keyed-in my password and at.... (I type in visudo)
root@DESKTOP-QP61AKG:/home/handshake92# visudo
it returns:
bash: visudo: command not found
root@DESKTOP-QP61AKG:/home/handshake92#
Where did I go wrong? Kindly advise.Thanks for helping.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.