vipw
This command is being used to edit /etc/passwd file manually. It is not recommended to edit /etc/passwd file manually. All changes on user accounts should be carried out using commands like usermod. But in some scenario if you want to edit passwd file manually, then use this command. It opens file in vi editor and locks it for other users. So any other admin from any other terminal wont be able to open the file in editor for manual editing. This ensures integrity of file.
pwck
To check integrity of /etc/passwd file this command can be used. Once executed it checks passwd files and its all fields. It reports any issues observed in the file e.g. if user directory does not exist on server, it will report it.
# /usr/sbin/pwck
[/etc/passwd] sfmdb:*:107:20::/home/sfmdb:/sbin/sh
Login directory not found
[/etc/passwd] smmsp:*:109:20::/home/smmsp:/sbin/sh
Login directory not found
pwconv

# /usr/sbin/pwconv
Updating the tcb to match /etc/passwd, if needed.
pwunconv
No comments
Post a Comment
Any thoughts?