Users, modifying
LionKimbro (Talk | contribs) (groups) |
|||
Line 6: | Line 6: | ||
To change a user's login name (account name,) you can edit [[ /etc/passwd]] and [[ /etc/master.passwd]] and recompile them using [[pwd_mkdb]], but another easy (and safe!) way to do it is to add a new user and move the user's files over to the new user and chmod and chown everything to that new user. | To change a user's login name (account name,) you can edit [[ /etc/passwd]] and [[ /etc/master.passwd]] and recompile them using [[pwd_mkdb]], but another easy (and safe!) way to do it is to add a new user and move the user's files over to the new user and chmod and chown everything to that new user. | ||
+ | |||
+ | To change the user's groups, edit [[/etc/group]]. [http://www.freebsd.org/doc/en/books/handbook/users-groups.html] | ||
[[Category:Common Tasks]] | [[Category:Common Tasks]] |
Revision as of 02:50, 8 December 2007
There are many ways to modify existing users on your system, depending on what you want to do; you can even edit the relevant files manually, but beware: the actual files referenced by the system aren't the plaintext editable files, they're compiled database files, so you'll need to use pwd_mkdb if you try to edit /etc/master.passwd directly.
To change a user's shell, use chsh or pw usermod [username] -s [path to new shell].
To change a user's name, edit /etc/passwd.
To change a user's login name (account name,) you can edit /etc/passwd and /etc/master.passwd and recompile them using pwd_mkdb, but another easy (and safe!) way to do it is to add a new user and move the user's files over to the new user and chmod and chown everything to that new user.
To change the user's groups, edit /etc/group. [1]