Hello I’d like to list all real users on Linux/*nix and it’s data. I probably need to parse /etc/passwd and /etc/shadow and check if user have password.
The problem is that is not cross-platform (on *BSD there is no /etc/shadow). Is there any cross-platform library/command I can use?
See man pages for getpwent.
I will add that if you want to check the passwords, look at getspent, getspnam for listing the shadow password file. The man page says that the getspent etc. functions might not be cross-platform though.