chpass

From NetBSD Wiki

(Redirected from chfn)
Jump to: navigation, search

With the chpass(1) command, you can change information about yourself in your login profile. This command is aliased as chfn(1) and chsh(1). There is no difference in behaviour if you call it by any of these names.

The default command

$ chpass

simply opens up vi (actually $EDITOR (or maybe $VISUAL??)) to show a list of fields with their current values. Just modify them and save the file, then exit the editor. The file will be parsed and if correct it will write your changes. If things are incorrect, it will tell you so and give you the opportunity to restart the editor on the file as you left it.

You can also just quickly change the shell, which is done with

$ chpass -s /bin/ksh

or, more naturally,

$ chsh -s /bin/ksh

(or any other shell, of course)

Root may also change other people's login information by just supplying a user arg at the end:

# chpass -s /bin/csh luke

See also

View source code (Please report any bugs or suggestions here).

Personal tools