免费注册 查看新帖 |

Chinaunix

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

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

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-10-16 11:12 |只看该作者 |倒序浏览
下面是加用户时的命令和错误, 不知道有人碰到过没,谢谢!

    #  useradd -u 107 -g 10 -d /export/home/sun -m -s /usr/bin/csh sun
    UX: useradd: ERROR: Inconsistent password files.  See pwconv(1M).

论坛徽章:
0
2 [报告]
发表于 2006-10-16 11:21 |只看该作者
# man pwconv
正在重新格式化页面。请等待... 完成

System Administration Commands                         pwconv(1M)

NAME
     pwconv - installs and updates /etc/shadow  with  information
     from /etc/passwd

SYNOPSIS
     pwconv

DESCRIPTION
     The pwconv command  creates  and  updates  /etc/shadow  with
     information from /etc/passwd.

     pwconv relies on a special value  of  'x'  in  the  password
     field  of  /etc/passwd. This value of 'x' indicates that the
     password for the user is already in /etc/shadow  and  should
     not be modified.

     If the /etc/shadow file does not exist,  this  command  will
     create  /etc/shadow  with  information from /etc/passwd. The
     command populates /etc/shadow with the  user's  login  name,
     password,  and password aging information. If password aging
     information does not exist in  /etc/passwd for a given user,
     none  will  be  added  to   /etc/shadow.  However,  the last
     changed information will always be updated.

     If the  /etc/shadow file does  exist,  the  following  tasks
     will be performed:

           Entries that are in the  /etc/passwd file and  not  in
           the  /etc/shadow file will be added to the /etc/shadow
           file.

           Entries that are in the  /etc/shadow file and  not  in
           the /etc/passwd file will be removed from /etc/shadow.

           Password attributes (for example, password  and  aging
           information)   that exist in an /etc/passwd entry will
           be moved to the corresponding entry in  /etc/shadow.

     The pwconv command can only be used by the super-user.

FILES
     /etc/opasswd

     /etc/oshadow

     /etc/passwd

     /etc/shadow

ATTRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:

SunOS 5.9            Last change: 9 Mar 1993                    1

System Administration Commands                         pwconv(1M)

     ____________________________________________________________
    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
    |_____________________________|_____________________________|
    | Availability                | SUNWcsu                     |
    |_____________________________|_____________________________|

SEE ALSO
     passwd(1),  passmgmt(1M),  usermod(1M),  passwd(4),   attri-
     butes(5)

DIAGNOSTICS
     pwconv exits with one of the following values:

     0     SUCCESS.

     1     Permission denied.

     2     Invalid command syntax.

     3     Unexpected failure.  Conversion not done.

     4     Unexpected failure.  Password file(s) missing.

     5     Password file(s) busy.  Try again later.

     6     Bad entry in /etc/shadow file.

SunOS 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
64 blocks

我这里操作成功,把你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]

# /usr/sbin/grpck [filename]

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



pwconv 这个语句怎么使用?

论坛徽章:
0
7 [报告]
发表于 2007-01-04 08:55 |只看该作者
up

论坛徽章:
0
8 [报告]
发表于 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