how to add user on debian 10?

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

how to add user on debian 10?

Postby hthi » 2019-07-09 19:42

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.
hthi
 
Posts: 171
Joined: 2015-05-09 15:43

Re: how to add user on debian 10?

Postby 4D696B65 » 2019-07-09 20:15

Code: Select all
su -
User avatar
4D696B65
 
Posts: 2444
Joined: 2009-06-28 06:09

Re: how to add user on debian 10?

Postby None1975 » 2019-07-10 16:30

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.
User avatar
None1975
 
Posts: 977
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

Re: how to add user on debian 10?

Postby debian-2019 » 2019-07-12 16:06

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
debian-2019
 
Posts: 20
Joined: 2019-03-20 18:25

Re: how to add user on debian 10?

Postby Head_on_a_Stick » 2019-07-13 08:16

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?
Don't break DebianHow to report bugsDebian Reference Card

SharpBang GNU/Linux® — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10985
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: how to add user on debian 10?

Postby vmclark » 2019-07-14 21:17

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.
vmclark
 
Posts: 167
Joined: 2008-07-30 15:16

Re: how to add user on debian 10?

Postby debian-2019 » 2019-07-15 18:59

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
debian-2019
 
Posts: 20
Joined: 2019-03-20 18:25

Re: how to add user on debian 10?

Postby hthi » 2019-07-15 20:07

Thanks.

apt install sudo


sudo is installed from the iso.
hthi
 
Posts: 171
Joined: 2015-05-09 15:43


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable