免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4901 | 回复: 6
打印 上一主题 下一主题

useradd添加用户报错,急! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-10-16 11:12 |只看该作者 |倒序浏览
下面是加用户时的命令和错误, 不知道有人碰到过没,谢谢!\r\n\r\n    #  useradd -u 107 -g 10 -d /export/home/sun -m -s /usr/bin/csh sun\r\n    UX: useradd: ERROR: Inconsistent password files.  See pwconv(1M).

论坛徽章:
0
2 [报告]
发表于 2006-10-16 11:21 |只看该作者
# man pwconv\r\n正在重新格式化页面。请等待... 完成\r\n\r\nSystem Administration Commands                         pwconv(1M)\r\n\r\nNAME\r\n     pwconv - installs and updates /etc/shadow  with  information\r\n     from /etc/passwd\r\n\r\nSYNOPSIS\r\n     pwconv\r\n\r\nDESCRIPTION\r\n     The pwconv command  creates  and  updates  /etc/shadow  with\r\n     information from /etc/passwd.\r\n\r\n     pwconv relies on a special value  of  \'x\'  in  the  password\r\n     field  of  /etc/passwd. This value of \'x\' indicates that the\r\n     password for the user is already in /etc/shadow  and  should\r\n     not be modified.\r\n\r\n     If the /etc/shadow file does not exist,  this  command  will\r\n     create  /etc/shadow  with  information from /etc/passwd. The\r\n     command populates /etc/shadow with the  user\'s  login  name,\r\n     password,  and password aging information. If password aging\r\n     information does not exist in  /etc/passwd for a given user,\r\n     none  will  be  added  to   /etc/shadow.  However,  the last\r\n     changed information will always be updated.\r\n\r\n     If the  /etc/shadow file does  exist,  the  following  tasks\r\n     will be performed:\r\n\r\n           Entries that are in the  /etc/passwd file and  not  in\r\n           the  /etc/shadow file will be added to the /etc/shadow\r\n           file.\r\n\r\n           Entries that are in the  /etc/shadow file and  not  in\r\n           the /etc/passwd file will be removed from /etc/shadow.\r\n\r\n           Password attributes (for example, password  and  aging\r\n           information)   that exist in an /etc/passwd entry will\r\n           be moved to the corresponding entry in  /etc/shadow.\r\n\r\n     The pwconv command can only be used by the super-user.\r\n\r\nFILES\r\n     /etc/opasswd\r\n\r\n     /etc/oshadow\r\n\r\n     /etc/passwd\r\n\r\n     /etc/shadow\r\n\r\nATTRIBUTES\r\n     See attributes(5) for descriptions of the  following  attri-\r\n     butes:\r\n\r\nSunOS 5.9            Last change: 9 Mar 1993                    1\r\n\r\nSystem Administration Commands                         pwconv(1M)\r\n\r\n     ____________________________________________________________\r\n    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |\r\n    |_____________________________|_____________________________|\r\n    | Availability                | SUNWcsu                     |\r\n    |_____________________________|_____________________________|\r\n\r\nSEE ALSO\r\n     passwd(1),  passmgmt(1M),  usermod(1M),  passwd(4),   attri-\r\n     butes(5)\r\n\r\nDIAGNOSTICS\r\n     pwconv exits with one of the following values:\r\n\r\n     0     SUCCESS.\r\n\r\n     1     Permission denied.\r\n\r\n     2     Invalid command syntax.\r\n\r\n     3     Unexpected failure.  Conversion not done.\r\n\r\n     4     Unexpected failure.  Password file(s) missing.\r\n\r\n     5     Password file(s) busy.  Try again later.\r\n\r\n     6     Bad entry in /etc/shadow file.\r\n\r\nSunOS 5.9            Last change: 9 Mar 1993                    2

论坛徽章:
0
3 [报告]
发表于 2006-10-16 11:28 |只看该作者
# useradd -u 107 -g 10 -d /home1/sun -m -s /usr/bin/csh sun\r\n64 blocks\r\n\r\n我这里操作成功,把你passwd粘贴一下

论坛徽章:
1
狮子座
日期:2013-09-02 12:10:41
4 [报告]
发表于 2006-10-16 11:59 |只看该作者
直接使用pwconv命令同步一下/etc/shadow和/etc/passwd文件,看报错应该是两个文件不一致导致的。

论坛徽章:
2
双鱼座
日期:2014-02-23 12:10:03操作系统版块每日发帖之星
日期:2015-12-17 06:20:00
5 [报告]
发表于 2006-10-16 12:33 |只看该作者
# /usr/sbin/pwck [filename]\r\n\r\n# /usr/sbin/grpck [filename]

论坛徽章:
0
6 [报告]
发表于 2006-10-16 15:21 |只看该作者
原帖由 byuq 于 2006-10-16 11:59 发表\r\n直接使用pwconv命令同步一下/etc/shadow和/etc/passwd文件,看报错应该是两个文件不一致导致的。
\r\n\r\n\r\npwconv 这个语句怎么使用?

论坛徽章:
0
7 [报告]
发表于 2007-01-04 13:48 |只看该作者
试试pwck命令,也许是你的/etc/passwd文件有问题了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP