Ubuntu Forums Archive Viewer

how to list of Groups on ubuntu server

Archived thread 1583028 from Bangalore Team. Markdown source: Bangalore_Team/thread_1583028_how_to_list__of_Groups_on_ubuntu_server.md

Original URL About this archive
#1

how to list of Groups on ubuntu server,

and how to create user on ubuntu server

#2
cat /etc/group

groups

sudo useradd *name*

sudo usermod -G *name-of-group* -a '*name-of-user*'


For more information on all these -- and it's really a good idea to make sure you know what you're doing before doing system-level commands -- you can type ```
info *command-name*

man *command-name*

#3

I did this without adding the -a option so now I no longer have root access, and oddly enough the admin group is no longer in the /etc/group file. Does anyone know how to recover from such a scenario? The link: http://ccollins.wordpress.com/2007/07/02/restore-default-ubuntu-groups/

talks about a similar situation but does not talk about how to add the admin group back into the /etc/group file. It's easy to edit back in but what number do you assign it?

#4

This is a really old thread. Closed. Please start a new thread.