In response to Jerry McAllister <jerr...@msu.edu>:

> On Wed, Mar 18, 2009 at 11:27:39AM -0400, Joe Chimento wrote:
> 
> > Is there an easy way to rename a user account belonging to 'www' group?
> > 
> 
> You could just use vipw(8) and edit the id name in the password entry.
> 
> Or, do you mean you want to change the group the user belongs to?
> If it is the user's primary group, then also use vipw to edit the entry.
> If it is a secondary group for that user, then edit the line in
> the /etc/group file and remove that user from it.   Put it in another
> group then if you want.
> 
> You might also have to change group ownership on files if you change
> the GID as well.

Jerry's advice is sound.

However, the canonical way to do this is using the pw command.  pw will
sanity check all your changes to ensure you don't end up with a groups
file that doesn't match your master.password, etc.

Unfortunately, the pw syntax is rather complex:
http://www.freebsd.org/cgi/man.cgi?query=pw&apropos=0&sektion=0&manpath=FreeBSD+7.1-RELEASE&format=html

It's somewhat better suited for use in scripts than use by humans.

-- 
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to