文章导航PC6首页软件下载单机游戏安卓资源苹果资源

pc软件新闻网络操作系统办公工具编程服务器软件评测

安卓新闻资讯应用教程刷机教程安卓游戏攻略tv资讯深度阅读综合安卓评测

苹果ios资讯苹果手机越狱备份教程美化教程ios软件教程mac教程

单机游戏角色扮演即时战略动作射击棋牌游戏体育竞技模拟经营其它游戏游戏工具

网游cf活动dnf活动lol周免英雄lol礼包

手游最新动态手游评测手游活动新游预告手游问答

您的位置:首页网络冲浪黑客天空 → 如何获取打印shadow文件

如何获取打印shadow文件

时间:2009/11/6 11:02:00来源:本站整理作者:我要评论(0)

/*  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黑客工具