[SOLVED] adduser fail?

New to Debian (Or Linux in general)? Ask your questions here!

[SOLVED] adduser fail?

Postby JeSuisFlaneur » 2020-06-13 17:00

Clean install. Tried to use su - to add sudo. Terminal returns sudo already added.

Code: Select all
mark@Lexington:~$ sudo deja-dup
[sudo] password for mark:
mark is not in the sudoers file.  This incident will be reported.

mark@Lexington:~$ id
uid=1000(mark) gid=1000(mark) groups=1000(mark),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),109(netdev),112(bluetooth),116(lpadmin),117(scanner)

mark@Lexington:~$ sudo deja-dup
[sudo] password for mark:
mark is not in the sudoers file.  This incident will be reported.


I tried using an response at https://stackoverflow.com/questions/47806576/username-is-not-in-the-sudoers-file-this-incident-will-be-reported. visudo and add my user credentials per that page, but it failed.

I cannot run deja-dup to restore my backup'd files to /home partition. Anybody know what I did wrong? Help, please.
Last edited by JeSuisFlaneur on 2020-06-17 16:18, edited 1 time in total.
JeSuisFlaneur
 
Posts: 38
Joined: 2019-08-28 16:00

Re: adduser fail?

Postby andre@home » 2020-06-13 17:31

Sometimes you have to logout and then login again when you just did some changes for the user you were logged in.
Workaround: do it as root...
https://www.linuxuprising.com/2019/09/f ... -file.html
andre@home
 
Posts: 386
Joined: 2011-10-02 08:00

Re: adduser fail?

Postby JeSuisFlaneur » 2020-06-13 17:44

I did log out and log in.

Terminal output AFTER the log-out/in

Code: Select all
mark@Lexington:~$ groups
mark cdrom floppy audio dip video plugdev netdev bluetooth lpadmin scanner
mark@Lexington:~$ sudo apt update
[sudo] password for mark:
mark is not in the sudoers file.  This incident will be reported.
mark@Lexington:~$ su -
Password:
root@Lexington:~# apt install sudo
Reading package lists... Done
Building dependency tree       
Reading state information... Done
sudo is already the newest version (1.8.27-1+deb10u2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@Lexington:~# exit
logout
mark@Lexington:~$ id
uid=1000(mark) gid=1000(mark) groups=1000(mark),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),109(netdev),112(bluetooth),116(lpadmin),117(scanner)
mark@Lexington:~$ whoami
mark
mark@Lexington:~$ sudo apt update
[sudo] password for mark:
mark is not in the sudoers file.  This incident will be reported.
JeSuisFlaneur
 
Posts: 38
Joined: 2019-08-28 16:00

Re: adduser fail?

Postby cuckooflew » 2020-06-13 17:52

Show us your actual sudoers file, so we can see what you actually did, use code boxes please, the instructions in that link are rather mixed up, so it is impossible to guess what you actually did.
But ,
Code: Select all
user_name ALL=(ALL)  ALL

*****important: "user_name", is your user name: eg: if I used it, mine would be:
Code: Select all
cuckooflew ALL=(ALL)  ALL


Is correct, that is what you should add, DO NOT use nano, or any random text editor, like they said.
You must use 'visudo' , and you must be root to do this.
Can you log in as root ? I hope you did set a root password when you intsalled, if not then we need to explain that as well, use
Code: Select all
$su -
$ password: (enter the root password you set when installing)

Note: For others as well, this is one reason you should all ways be sure to set a root password when installing.
by JeSuisFlaneur »I cannot run deja-dup to restore my backup'd files

Actually if you can log in as root, using
Code: Select all
 su -
you should be able to run it as root, personally I think "sudo" and sudoers is a bunch of crap, I do not use that myself, but any way the others "follow the crowd" do, and that is another topic, sorry.
So any way, after you login as root, type :
Code: Select all
#  visudo /etc/sudoers

Then edit it as needed, save and exit. I think you may need to logout and login again, first but don't remember.
There is better tutorials and documentation on this at the Debian.org website, and the Debian wiki, use some search foo to find it... I will do that for you, in a little while,...first I need to take some medicine, and then I will be back. Or maybe some one else will post the links, I never can remember them, so allways have to do some search foo my self.
Please Read.. What we expect you have already Done.
Does any one know about this ?
Users browsing this forum: Google Knows, and
My grand father knows all about everything:
…one flew east, one flew west,
One flew over the cuckoo’s nest.
cuckooflew
 
Posts: 388
Joined: 2018-05-10 19:34
Location: Some where out west

Re: adduser fail?

Postby Bulkley » 2020-06-13 18:17

cuckooflew wrote: . . . personally I think "sudo" and sudoers is a bunch of crap . . .


+1.
Bulkley
 
Posts: 5942
Joined: 2006-02-11 18:35

Re: adduser fail?

Postby JeSuisFlaneur » 2020-06-13 18:23

I requires more than log out and log in.

I rebooted. Now it works.

Thank you for taking your time to stay with me. Thank you, Linux Community.
JeSuisFlaneur
 
Posts: 38
Joined: 2019-08-28 16:00

Re: adduser fail?

Postby RU55EL » 2020-06-13 19:04

Please add [SOLVED] to the subject of your first post.
User avatar
RU55EL
 
Posts: 441
Joined: 2014-04-07 03:42
Location: /home/russel


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 10 guests

fashionable