How can I create users with privilege in ubuntu 10.04 server by using CLI
Asked
Active
Viewed 247 times
2 Answers
2
Create a (normal) user:
sudo adduser
Give user sudo
rights. Default all admin users can sudo, so you can just move your new user into that group.
sudo usermod -a -G admin my_new_user
Or add it manually do the sudoers file (/etc/sudoers
)
sudo visudo
And add
my_new_user ALL=(ALL) ALL

Gert
- 198
- 3
- 12
0
I guess you are talking about being able to run sudo and stuff like that. Well for that to happen you have to belong to the admin group.
In order to keep this user as similar to another ubuntu user as possible the full command would be:
sudo groupadd foo
sudo useradd foo -g foo -G 'adm,disk,dialout,cdrom,plugdev,lpadmin,admin' -m
The most important one here is 'admin' as that would allow the user to run sudo which is probably what you want.

user52763
- 101