Install libpasswd-unix-perl by entering the following commands in the terminal:
sudo apt update sudo apt install libpasswd-unix-perl
object-oriented and function interface to standard Unix files
The Passwd::Unix module provides an abstract interface to /etc/passwd, /etc/shadow and /etc/group format files. It is inspired by Unix::PasswdFile module (that one does not handle /etc/shadow file, what is necessary in modern systems like Sun Solaris 10 or Linux).