From 5abc12ab568ea40a9ee9ba0985420c36ce31b23d Mon Sep 17 00:00:00 2001 From: Alan Hicks Date: Sat, 3 Jul 2010 16:08:02 -0400 Subject: Handled a few more TODO entries (and created a couple more). --- chapter_09.xml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'chapter_09.xml') diff --git a/chapter_09.xml b/chapter_09.xml index a2bb4e9..c2866e0 100644 --- a/chapter_09.xml +++ b/chapter_09.xml @@ -179,6 +179,29 @@ doesn't actually shutout the account, but instead changes the user's encrypted password to a value that can't be matched. + +The easiest way for modifying a user's information is the +usermod(8) utility which is capable of +modifying everything from group membership to home directories. A full +listing of its features won't be given here, so check the man page. +usermod is perhaps the best tool to use for +modifying a user's group members. The -s and -G +arguments accomplish this. + + +darkstar:~# usermod -a -G wheel alan +darkstar:~# usermod -G wheel alan + + + +It important to note the differences in the two commands above. The +first command adds the user "alan" to the "wheel" group without +modifying any other groups "alan" belongs to. The second command also +makes "alan" a member of the "wheel" group, but also removes the user's +membership from any other groups, something you will very rarely want +to do! + + Another useful tool is chsh(1) which changes a user's default shell. Like passwd, normal -- cgit v1.2.3