VIPW(8) COMMAND REFERENCE VIPW(8) NAME vipw, pwck - edit and/or check the password file SYNOPSIS vipw [ -c [ filename ... ] ] pwck [ -c ] [ filename ... ] DESCRIPTION With no arguments, vipw locks the file /etc/passwd, copies its contents to a temporary file, and invokes the editor (default = vi) on the temporary file. After the editor is exited, the modified data is checked as described below. If no problems are found, the temporary file replaces the old password file, which is unlocked. If only problems in the Warning category are found, the user may reedit the file, quit without updating, or update the password file, ignoring the warnings. If any problems in the ERROR category are found, the user may reedit the file or quit without updating. If called as pwck or with the -c option, vipw checks the named files as described below. If no names are given, /etc/passwd is checked. File Checking The following problems are considered Warnings; when they occur, a message is printed giving the line number and a description of the problem. 1 User name longer than 8 characters 2 User name begins with non-alphabetic character 3 User name contains characters other than a-z, A-Z, 0-9, -, and _ 4 The home directory does not exist or is not a directory These problems are considered ERRORs; when they occur, a message is printed giving the line number and a description of the problem. 1 Not enough fields. 2 Too many fields. 3 Entry longer than 1024 characters. 4 Non-numeric or empty user id field. Printed 4/6/89 1
VIPW(8) COMMAND REFERENCE VIPW(8) 5 Non-numeric or empty group id field. 6 The shell program does not exist or is not executable. OPTIONS -c Check the named files (default is /etc/passwd). Do not edit the password file. FILES /etc/passwd The password file to edit or the default file to check. /etc/ptmp The temporary edit file. VARIABLES EDIT The editor to be used instead of vi. RETURN VALUE [NO_ERRS] Command completed without error. [USAGE] Incorrect command line syntax. Execution terminated. [1] The file(s) contained errors. [NP_WARN] An error warranting a warning message occurred. Execution continues. [NP_ERR] An error occurred that was not a system error. Execution terminated. [P_WARN] A system error occurred. Execution continues. See intro(2) for more information on system errors. [P_ERR] A system error occurred. Execution terminated. See intro(2) for more information on system errors. CAVEATS The vipw command can only be used by root to edit the password file (any user can use pwck and vipw with the -c option); its use should be restricted to major modifications and corrections. Make normal changes with chfn(1), chsh(1), passwd(1), and other utilities. The earlier versions of this utility were shell scripts. It is imperative that the earlier versions not be used in this system. Locking is now handled by the kernel, whereas the shell scripts used a lock file. Printed 4/6/89 2
VIPW(8) COMMAND REFERENCE VIPW(8) SEE ALSO chfn(1), chsh(1), passwd(1), and passwd(5). Printed 4/6/89 3
%%index%% na:240,100; sy:340,310; de:650,2041;3003,130; op:3133,217; fi:3350,225; va:3575,162; rv:3737,887; ca:4624,777; se:5713,226; %%index%%000000000157