StudyingUnixInterface/6/etc/spwd.c

15 lines
307 B
C
Raw Permalink Normal View History

2020-12-09 10:08:25 +00:00
#include <shadow.h>
#include <stdio.h>
int main(void) {
struct spwd *p_spwd = getspnam("eric");
printf("%s %s %ld %lu\n", p_spwd->sp_namp, p_spwd->sp_pwdp, p_spwd->sp_flag, p_spwd->sp_max);
printf("%ld %ld %ld\n", p_spwd->sp_min, p_spwd->sp_inact, p_spwd->sp_warn);
endspent();
return 0;
}