I added a user account to the admin group and discovered I added wrong user. So I now have to remove the account from the admin group.
How can I remove an account from a group without deleting the user?
|
I added a user account to the How can I remove an account from a group without deleting the user? |
||||
|
|
|
Portablejim's answer is accurate but dangerous -- if you typo something, your system may be unusable, especially if you alter the admin group improperly. If you must edit the groups file, use the From a commandline, the one you probably want to use is the following (as root):
This will remove the specified user from the specified group. You must relogin to see the effect. It will not delete the user, or the group, just the membership. There are also ways of doing it with the |
|||||||||||||
|
|
See zanfur's answer. Edit the i.e.
becomes
Be warned, typos within the file could break your system. |
|||||||||||||
|
|
The easiest and safest way:
and delete it manually. |
|||||
|
|
You can use the below command
where "group" is the group that you want to remove the user and "user name" the user that you want to remove from the "group". The above command should be given with out the quotes ex.
BR |
|||||
|
|
I think you can do this
or you can view the manual of gpasswd |
|||||
|