| 1 | CHPASS(1) UNIX Reference Manual CHPASS(1) |
| 2 | |
| 3 | N\bNA\bAM\bME\bE |
| 4 | c\bch\bhp\bpa\bas\bss\bs - add or change user database information |
| 5 | |
| 6 | S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS |
| 7 | chpass [-\b-a\ba _\bl_\bi_\bs_\bt] [-\b-s\bs _\bs_\bh_\be_\bl_\bl] [user] |
| 8 | |
| 9 | D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN |
| 10 | C\bCh\bhp\bpa\bas\bss\bs allows editing of the user database information associated with |
| 11 | _\bu_\bs_\be_\br or, by default, the current user. The information is formatted and |
| 12 | supplied to an editor for changes. |
| 13 | |
| 14 | Only the information that the user is allowed to change is displayed. |
| 15 | |
| 16 | The options are as follows: |
| 17 | |
| 18 | -\b-a\ba The super-user is allowed to directly supply a user database entry, |
| 19 | in the format specified by passwd(5), as an argument. This argu- |
| 20 | ment must be a colon (``:'') separated list of all the user data- |
| 21 | base fields, although they may be empty. |
| 22 | |
| 23 | -\b-s\bs The -\b-s\bs option attempts to change the user's shell to _\bn_\be_\bw_\bs_\bh. |
| 24 | |
| 25 | Possible display items are as follows: |
| 26 | |
| 27 | Login: user's login name |
| 28 | Password: user's encrypted password |
| 29 | Uid: user's id |
| 30 | Gid: user's login group id |
| 31 | Change: password change time |
| 32 | Expire: account expiration time |
| 33 | Class: user's general classification |
| 34 | Home Directory: user's home directory |
| 35 | Shell: user's login shell |
| 36 | Full Name: user's real name |
| 37 | Location: user's normal location |
| 38 | Home Phone: user's home phone |
| 39 | Office Phone: user's office phone |
| 40 | |
| 41 | |
| 42 | The _\bl_\bo_\bg_\bi_\bn field is the user name used to access the computer account. |
| 43 | |
| 44 | The _\bp_\ba_\bs_\bs_\bw_\bo_\br_\bd field contains the encrypted form of the user's password. |
| 45 | |
| 46 | The _\bu_\bi_\bd field is the number associated with the _\bl_\bo_\bg_\bi_\bn field. Both of |
| 47 | these fields should be unique across the system (and often across a group |
| 48 | of systems) as they control file access. |
| 49 | |
| 50 | While it is possible to have multiple entries with identical login names |
| 51 | and/or identical user id's, it is usually a mistake to do so. Routines |
| 52 | that manipulate these files will often return only one of the multiple |
| 53 | entries, and that one by random selection. |
| 54 | |
| 55 | The _\bg_\br_\bo_\bu_\bp field is the group that the user will be placed in at login. |
| 56 | Since this system supports multiple groups (see groups(1)) this field |
| 57 | currently has little special meaning. This field may be filled in with |
| 58 | either a number or a group name (see group(5)). |
| 59 | |
| 60 | The _\bc_\bh_\ba_\bn_\bg_\be field is the date by which the password must be changed. |
| 61 | |
| 62 | The _\be_\bx_\bp_\bi_\br_\be field is the date on which the account expires. |
| 63 | |
| 64 | Both the _\bc_\bh_\ba_\bn_\bg_\be and _\be_\bx_\bp_\bi_\br_\be fields should be entered in the form ``month |
| 65 | day year'' where _\bm_\bo_\bn_\bt_\bh is the month name (the first three characters are |
| 66 | sufficient), _\bd_\ba_\by is the day of the month, and _\by_\be_\ba_\br is the year. |
| 67 | The _\bc_\bl_\ba_\bs_\bs field is currently unused. In the near future it will be a key |
| 68 | to a termcap(5) style database of user attributes. |
| 69 | |
| 70 | The user's _\bh_\bo_\bm_\be _\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by is the full UNIX path name where the user will |
| 71 | be placed at login. |
| 72 | |
| 73 | The _\bs_\bh_\be_\bl_\bl field is the command interpreter the user prefers. If the |
| 74 | _\bs_\bh_\be_\bl_\bl field is empty, the Bourne shell, /_\bb_\bi_\bn/_\bs_\bh, is assumed. When alter- |
| 75 | ing a login shell, and not the super-user, the user may not change from a |
| 76 | non-standard shell or to a non-standard shell. Non-standard is defined |
| 77 | as a shell not found in /_\be_\bt_\bc/_\bs_\bh_\be_\bl_\bl_\bs. |
| 78 | |
| 79 | The last four fields are for storing the user's _\bf_\bu_\bl_\bl _\bn_\ba_\bm_\be, _\bo_\bf_\bf_\bi_\bc_\be |
| 80 | _\bl_\bo_\bc_\ba_\bt_\bi_\bo_\bn, and _\bh_\bo_\bm_\be and _\bw_\bo_\br_\bk _\bt_\be_\bl_\be_\bp_\bh_\bo_\bn_\be numbers. |
| 81 | |
| 82 | Once the information has been verified, c\bch\bhp\bpa\bas\bss\bs uses mkpasswd(8) to update |
| 83 | the user database. This is run in the background, and, at very large |
| 84 | sites could take several minutes. Until this update is completed, the |
| 85 | password file is unavailable for other updates and the new information |
| 86 | will not be available to programs. |
| 87 | |
| 88 | E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT |
| 89 | The vi(1) editor will be used unless the environment variable EDITOR is |
| 90 | set to an alternate editor. When the editor terminates, the information |
| 91 | is re-read and used to update the user database itself. Only the user, |
| 92 | or the super-user, may edit the information associated with the user. |
| 93 | |
| 94 | F\bFI\bIL\bLE\bES\bS |
| 95 | /_\be_\bt_\bc/_\bm_\ba_\bs_\bt_\be_\br._\bp_\ba_\bs_\bs_\bw_\bd The user database |
| 96 | /_\be_\bt_\bc/_\bs_\bh_\be_\bl_\bl_\bs The list of approved shells |
| 97 | |
| 98 | |
| 99 | S\bSE\bEE\bE A\bAL\bLS\bSO\bO |
| 100 | login(1), finger(1), getusershell(3), passwd(5), mkpasswd(8), vipw(8) |
| 101 | |
| 102 | Robert Morris and Ken Thompson, _\bU_\bN_\bI_\bX _\bP_\ba_\bs_\bs_\bw_\bo_\br_\bd _\bs_\be_\bc_\bu_\br_\bi_\bt_\by |
| 103 | |
| 104 | H\bHI\bIS\bST\bTO\bOR\bRY\bY |
| 105 | First release 4.3 Reno BSD. |
| 106 | |
| 107 | B\bBU\bUG\bGS\bS |
| 108 | User information should (and eventually will) be stored elsewhere. |