Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

how to add user on debian 10?

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
hthi
Posts: 213
Joined: 2015-05-09 15:43
Has thanked: 1 time

how to add user on debian 10?

#1 Post by hthi »

debian 10

Code: Select all

su
adduser 'user name' sudo
On debian 9 64bit it worked. On debian 10 it does not. I tried

Code: Select all

su
sudo su
adduser 'user name' sudo
Is that how you get a user sudo? Thanks.

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 86 times

Re: how to add user on debian 10?

#2 Post by 4D696B65 »

Code: Select all

su -

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1398
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 46 times
Been thanked: 68 times

Re: how to add user on debian 10?

#3 Post by None1975 »

hthi wrote:Is that how you get a user sudo? Thanks.
Install sudo:

Code: Select all

su -
apt update
apt install sudo
Configure sudo

Code: Select all

# adduser foo sudo
After being added to a new group the user must log out and then log back in again for the new group to take effect.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

debian-2019
Posts: 39
Joined: 2019-03-20 18:25
Has thanked: 5 times
Been thanked: 4 times

Re: how to add user on debian 10?

#4 Post by debian-2019 »

Here is a method that works for me when adding a user to the sudoer group:

1) In the terminal,

Code: Select all

su
PATH=$PATH:/usr/sbin
visudo
2) After the visudo command, find the line that says

Code: Select all

%sudo   ALL=(ALL:ALL) ALL
3) Under that line add the code below (assuming myusername is the user name)

Code: Select all

myusername   ALL=(ALL:ALL) ALL
4) exit root

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: how to add user on debian 10?

#5 Post by Head_on_a_Stick »

debian-2019 wrote:

Code: Select all

su
PATH=$PATH:/usr/sbin
visudo
You don't need to change PATH if you call the su command correctly, did you not see 4D696B65's post?
deadbang

vmclark
Posts: 187
Joined: 2008-07-30 15:16
Has thanked: 1 time

Re: how to add user on debian 10?

#6 Post by vmclark »

It appears to be a two step process:

1)adduser 'user' sudo
2) visudo

Its been years since I last installed debian. I was expecting this info to be in a How-To somewhere.
Thanks for this topic.

debian-2019
Posts: 39
Joined: 2019-03-20 18:25
Has thanked: 5 times
Been thanked: 4 times

Re: how to add user on debian 10?

#7 Post by debian-2019 »

Head_on_a_Stick wrote:
debian-2019 wrote:

Code: Select all

su
PATH=$PATH:/usr/sbin
visudo
You don't need to change PATH if you call the su command correctly, did you not see 4D696B65's post?
I didn't know that. Thanks for the tip! :D

hthi
Posts: 213
Joined: 2015-05-09 15:43
Has thanked: 1 time

Re: how to add user on debian 10?

#8 Post by hthi »

Thanks.
apt install sudo
sudo is installed from the iso.

Post Reply