What's the command line utility and the arguments it requires?
|
feedback
|
migrated from stackoverflow.com Jan 14 '10 at 22:40
This question came from our site for professional and enthusiast programmers.
|
The utility is
Where To check a users group memberships use the
| |||
|
feedback
|
|
Assuming the user already exists, the easiest way is to just open the file You can check by doing a | ||||
|
feedback
|
|
On Debian, and I assume on Ubuntu as well, the canonical way of adding users and adding users to groups is through the adduser script, not useradd. To add a user to a group, just use:
Though using useradd or usermod works as well of course and is probably more cross platform (but the adduser script reads settings from /etc/adduser.conf and is hence usually preferable). | |||
|
feedback
|
|
Adding Groups
Adding user to the group
will show the details of user user1 | |||
|
feedback
|
|
First, as an infosec professional I completely agree with the additional security benefits and best practices SUDO provides. **Before using the following commands, it is your responsibility to understand the ramifications of creating and using a root-level account. Use may result in a security compromised system or you may render your system COMPLETELY UNUSABLE. ** You agree by using the information contained herein that any negative impact or results to any system, data or network are entirely your responsibility. Create additional root-level accounts by running these commands from a terminal session:
You should see something similar to:
(in the usermod command string, the first switch is the letter "O". The characters following the -u and -g switches are each "zero")
You should now see something similar to: I suggest bouncing your system prior to logging on with the newly created root-level user account.
These commands work well in most main stream *nix and BSD distributions. Use them wisely. | ||||
|
feedback
|
