Users, modifying

From FreeBSDwiki
Revision as of 16:09, 8 December 2007 by (Talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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 or primary group, 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 member groups, edit /etc/group. [1]

Personal tools