How are shadow passwords given in Linux?

The pwconv command in Linux is used to generate shadow passwords. Shadow passwords are used to improve the security of the system. This command creates the file /etc/shadow and modifies the /etc/passwd file to set all passwords to ‘x’.

The entries in the shadowed file that do not appear in the main file are first deleted. The shadowed entries that don’t have a password of “x” in the main file are then updated. Any shadowed entries that are missing are also inserted. Finally, ‘x’ is used to substitute passwords in the main file. If the primary file is changed by hand, these applications can be used to update the shadowed file as well as for initial conversion.