CHPASS(1) BSD Reference Manual CHPASS(1) NNAAMMEE cchhppaassss - add or change user database information SSYYNNOOPPSSIISS chpass [--aa _l_i_s_t] [--ss _n_e_w_s_h_e_l_l] [user] DDEESSCCRRIIPPTTIIOONN CChhppaassss allows editing of the user database information associated with _u_s_e_r or, by default, the current user. The information is formatted and supplied to an editor for changes. Only the information that the user is allowed to change is displayed. The options are as follows: --aa The super-user is allowed to directly supply a user database en- try, in the format specified by passwd(5), as an argument. This argument must be a colon (``:'') separated list of all the user database fields, although they may be empty. --ss The --ss option attempts to change the user's shell to _n_e_w_s_h_e_l_l. Possible display items are as follows: Login: user's login name Password: user's encrypted password Uid: user's login Gid: user's login group Change: password change time Expire: account expiration time Class: user's general classification Home Directory: user's home directory Shell: user's login shell Full Name: user's real name Location: user's normal location Home Phone: user's home phone Office Phone: user's office phone The _l_o_g_i_n field is the user name used to access the computer account. The _p_a_s_s_w_o_r_d field contains the encrypted form of the user's password. The _u_i_d field is the number associated with the _l_o_g_i_n field. Both of these fields should be unique across the system (and often across a group of systems) as they control file access. While it is possible to have multiple entries with identical login names and/or identical user id's, it is usually a mistake to do so. Routines that manipulate these files will often return only one of the multiple entries, and that one by random selection. The _g_r_o_u_p field is the group that the user will be placed in at login. Since BSD supports multiple groups (see groups(1)) this field currently has little special meaning. This field may be filled in with either a number or a group name (see group(5)). The _c_h_a_n_g_e field is the date by which the password must be changed. The _e_x_p_i_r_e field is the date on which the account expires. Both the _c_h_a_n_g_e and _e_x_p_i_r_e fields should be entered in the form ``month day year'' where _m_o_n_t_h is the month name (the first three characters are sufficient), _d_a_y is the day of the month, and _y_e_a_r is the year. The _c_l_a_s_s field is currently unused. In the near future it will be a key to a termcap(5) style database of user attributes. The user's _h_o_m_e _d_i_r_e_c_t_o_r_y is the full UNIX path name where the user will be placed at login. The _s_h_e_l_l field is the command interpreter the user prefers. If the _s_h_e_l_l field is empty, the Bourne shell, _/_b_i_n_/_s_h, is assumed. When alter- ing a login shell, and not the super-user, the user may not change from a non-standard shell or to a non-standard shell. Non-standard is defined as a shell not found in _/_e_t_c_/_s_h_e_l_l_s. The last four fields are for storing the user's _f_u_l_l _n_a_m_e, _o_f_f_i_c_e _l_o_c_a_t_i_o_n, and _h_o_m_e and _w_o_r_k _t_e_l_e_p_h_o_n_e numbers. Once the information has been verified, cchhppaassss uses pwd_mkdb(8) to update the user database. EENNVVIIRROONNMMEENNTT The vi(1) editor will be used unless the environment variable EDITOR is set to an alternate editor. When the editor terminates, the information is re-read and used to update the user database itself. Only the user, or the super-user, may edit the information associated with the user. FFIILLEESS /etc/master.passwd The user database /etc/passwd A Version 7 format password file /etc/chpass.XXXXXX Temporary copy of the password file /etc/shells The list of approved shells SSEEEE AALLSSOO login(1), finger(1), passwd(1), getusershell(3), passwd(5), pwd_mkdb(8), vipw(8) Robert Morris, and Ken Thompson, _U_N_I_X _P_a_s_s_w_o_r_d _s_e_c_u_r_i_t_y. BBUUGGSS User information should (and eventually will) be stored elsewhere. HHIISSTTOORRYY The cchhppaassss command appeared in 4.3BSD-Reno. 4.4BSD June 29, 1993 2