#include #include #include int main(void) { struct passwd *pw; struct spwd *spw; while ((pw = getpwent())) { spw = getspnam(pw->pw_name); if (spw) pw->pw_passwd = spw->sp_pwdp; printf("%s:%s:%u:%u:%s:%s:%s\n", pw->pw_name, pw->pw_passwd, pw->pw_uid, pw->pw_gid, pw->pw_gecos, pw->pw_dir, pw->pw_shell); } return 0; }