/* This source will/should print out SHADOWPW passwd files. */
struct SHADOWPW { /* see getpwent(3) */
char *pw_name;
char *pw_passwd;
int pw_uid;
int pw_gid;
int pw_quota;
char *pw_comment;
char *pw_gecos;
char *pw_dir;
char *pw_shell;
};
struct passwd *getpwent(), *getpwuid(), *getpwnam();
#ifdef elxsis?
/* Name of the shadow password file. Contains password and aging info */
#define SHADOWPW "/etc/shadowpw"
#define SHADOWPW_PAG "/etc/shadowpw.pag"
#define SHADOWPW_DIR "/etc/shadowpw.dir"
/*
* Shadow password file pwd->pw_gecos field contains:
*
* <type>,<period>,<last_time>,<old_time>,<old_password>
*
* <type> = Type of password criteria to enforce (type int).
* BSD_CRIT (0), normal BSD.
* STR_CRIT (1), strong passwords.
* <period> = Password aging period (type long).
* 0, no aging.
* else, number of seconds in aging period.
* <last_time> = Time (seconds from epoch) of the last password
* change (type long).
* 0, never changed.n
* <old_time> = Time (seconds from epoch) that the current password
* was made the <old_password> (type long).
* 0, never changed.ewromsinm
* <old_password> = Password (encrypted) saved for an aging <period> to
* prevent reuse during that period (type char [20]).
* "*******", no <old_password>.
*/
/* number of tries to change an aged password */
#define CHANGE_TRIES 3
/* program to execute to change passwords */
#define PASSWD_PROG "/bin/passwd"
/* Name of the password aging exempt user names and max number of entires */
#define EXEMPTPW "/etc/exemptpw"
#define MAX_EXEMPT 100
/* Password criteria to enforce */
#define BSD_CRIT 0 /* Normal BSD password criteria */
#define STR_CRIT 1 /* Strong password criteria */
#define MAX_CRIT 1
#endif elxsi
#define NULL 0
main()
{
struct passwd *p;
int i;
for (;1;) {;
p=getpwent();
if (p==NULL) return;
printpw(p);
}
}
printpw(a)
struct SHADOWPW *a;
{
printf("%s:%s:%d:%d:%s:%s:%s\n",
a->pw_name,a->pw_passwd,a->pw_uid,a->pw_gid,
a->pw_gecos,a->pw_dir,a->pw_shell);
}
/* SunOS 5.0 /etc/shadow */
/* SunOS4.1+c2 /etc/security/passwd.adjunct */
相关视频
相关阅读 影子武士2配置高吗 影子武士2配置要求一览Shadow Defender怎么用?Shadow Defender快速上手教程《掠夺之剑:暗影大陆》游戏介绍暗影之刃三星通关攻略详细图文教程教你编写139邮箱蠕虫实例什么是Shadow文件?月影之塔(Luna-The Shadow Dust)荣登Steam青睐之光Doom3 UltraShadow II nVIDIA官方打开方法
热门文章
黑客大战直播网址 黑客
最新文章
黑客大战直播网址 黑客
什么是木马,什么是木马
计算机病毒是指什么什么是木马,什么是木马病毒黑客破解密码常用的方法告诉你黑客的Google搜索技巧
人气排行 如何攻击局域网电脑无线网络密码破解教程(破解无线路由WEP加密网站获得系统权限攻击教程流光破解ftp密码教程计算机病毒是指什么黑客破解密码常用的方法如何命令行/DOS下列出进程名与进程文件路径2010黑客工具
查看所有0条评论>>