-3

Can someone make a post that explains, with a new install of ubuntu, shell command(s) how to create a new "admin" user that is the same as what you get when you use GUI.

sudo useradd bob -d /home/jerewis --groups admin
sudo usermod bob -aG sudo 

Lots of posts about how to create use but what you get is a way different shell and enviroment then if you use GUI. Which is rediculous.

Many other distributions this is just simple. It copies over /etc/skel which has basic user profile of bash and structure. If you add them to "sudo" or "wheel" etc... they can then run elevated commands. I just tested this again on 24.04 and gave up and used the GUI to create the user as it was too many yak layers to get a basic admin account created.

Thanks...

muru
  • 207,228

1 Answers1

0

Open a terminal and become a super-user

  exec sudo -i

adduser bob

Enter the new password:

Re-enter the new password:

Enter the new value, or press ENTER to use the default value:

Is the information correct? [Y/n] Y

Or:

  exec sudo -i

useradd -m bob

passwd bob

Enter the new password:

Re-enter the new password:

passwd: password updated successfully

Add the user to sudoers:

 nano -c /etc/sudoers

Leave it like that:

 # Allow members of group sudo to execute any command
 %sudo   ALL=(ALL:ALL) ALL
 bob ALL=(ALL:ALL) ALL

Ctrl + O - save

Ctrl + X - close

  exit

cocomac
  • 3,824
kyodake
  • 17,808