免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: lmix
打印 上一主题 下一主题

root用户修改自己的passwd居然提示Permission denied,没天理阿,求助! [复制链接]

论坛徽章:
0
11 [报告]
发表于 2006-01-23 09:56 |只看该作者
原帖由 q1208c 于 2005-12-5 19:45 发表

不能
passwd 是用用户名加password 一起做的md5.所以, 不同用户,相同密码的md5是不同的.



I don't think so.

I have copied a lot of passwords in such a way. (Solaris 8/RH Linux + DES encryption).

And, I did another test on my Linux box: MD5 password can be copied. It's nothing to do with a user name.

论坛徽章:
0
12 [报告]
发表于 2006-01-23 10:04 |只看该作者
原帖由 lmix 于 2005-12-5 14:30 发表
root用户修改自己的passwd居然提示Permission denied,没天理阿,哪位大侠遇到过这种问题?



it could be due to /etc/passwd or /etc/shadow corrupted.

wc -l /etc/passwd /etc/shadow

if their line numbers are different, fix it.

if the same, compare their account names:

# awk -F:  '{print $1}' /etc/passwd | sort > /tmp/tmp1
# awk -F:  '{print $1}' /etc/shadow | sort > /tmp/tmp2
# diff /tmp/tmp1 /tmp/tmp2

if different, fix it.

Be reminded that,  the permission of /etc/passwd should be "444", and the one of /etc/shadow should be 400.

论坛徽章:
0
13 [报告]
发表于 2006-01-23 11:51 |只看该作者
12楼如果说的是正确的话,只要执行一下pwconv就可以了
不过我觉得还是用了NIS的可能性大,
ps -aef |grep yp
看一下有没有在用NIS

论坛徽章:
0
14 [报告]
发表于 2006-01-23 12:04 |只看该作者
原帖由 doni 于 2006-1-23 11:51 发表
12楼如果说的是正确的话,只要执行一下pwconv就可以了
不过我觉得还是用了NIS的可能性大,
ps -aef |grep yp
看一下有没有在用NIS



if so, then do

# ps -ef | egrep "yp|nis|ldap"

if either of NIS, NIS+, LDAP is configured, then do

# passwd -r files root

to change local root's password.

论坛徽章:
0
15 [报告]
发表于 2006-10-24 15:23 |只看该作者

passwd不能用,应该是相关文件配置错误

我开始也碰到这个问题了,后来看了一些,是/etc/nsswitch.conf里面有点问题,可以将相关行中(主要是user、group)的nis去掉,或者将其顺序调到最后。

论坛徽章:
0
16 [报告]
发表于 2006-10-24 23:28 |只看该作者
应该是使用了nis验证吧?
Dec  6 10:47:51 sv1 passwd[11301]: [ID 587833 user.error] passwdutil.so: can't get domain

如果不是的话。那我以前也碰到过..好像是文件被设置了sticky属性了.
ls -l /etc/passwd
帖出来看看.

论坛徽章:
0
17 [报告]
发表于 2011-02-28 12:33 |只看该作者
遇到类似问题,发现/usr/lib/netsvc/yp/ypbind 没有运行。用ROOT执行一下后好了

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
18 [报告]
发表于 2011-02-28 22:58 |只看该作者
不能
passwd 是用用户名加password 一起做的md5.所以, 不同用户,相同密码的md5是不同的.
q1208c 发表于 2005-12-05 19:45



这么老的贴子了....
这说法绝对是错的,password跟用户名无关,solaris是默认是des算法加密的,为密码和salt加密而成.只要有权修改shadow文件,把别的用户的密文借过去,密码一样可以用.

论坛徽章:
0
19 [报告]
发表于 2011-03-03 10:44 |只看该作者
这坟挖的有水平。

论坛徽章:
33
荣誉会员
日期:2011-11-23 16:44:17天秤座
日期:2014-08-26 16:18:20天秤座
日期:2014-08-29 10:12:18丑牛
日期:2014-08-29 16:06:45丑牛
日期:2014-09-03 10:28:58射手座
日期:2014-09-03 16:01:17寅虎
日期:2014-09-11 14:24:21天蝎座
日期:2014-09-17 08:33:55IT运维版块每日发帖之星
日期:2016-04-17 06:23:27操作系统版块每日发帖之星
日期:2016-04-18 06:20:00IT运维版块每日发帖之星
日期:2016-04-24 06:20:0015-16赛季CBA联赛之天津
日期:2016-05-06 12:46:59
20 [报告]
发表于 2011-08-15 19:29 |只看该作者
回复 18# 非凡公子


   
我是说错了. 你说的对.

谢谢提醒.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP