| |
| Shell基础---标准输入(stdin)的应用技巧 |
|
| 来源:
ChinaUnix博客 日期:
2008.04.11 08:20 (共有条评论) 我要评论 |
| |
为已经在上一节shell基础中添加的用户设置相同的密码,密码为redhat
[root@localhost ~]# for i in tom joe kate mary
> do
> echo redhat | passwd $i --stdin
> done
Changing password for user tom.
passwd: all authentication tokens updated successfully.
Changing password for user joe.
passwd: all authentication tokens updated successfully.
Changing password for user kate.
passwd: all authentication tokens updated successfully.
Changing password for user mary.
passwd: all authentication tokens updated successfully.

请问,如何为上面的用户设置和用户名相同的密码
tom 的密码是 tom
joe 的密码是 joe
kate 的密码是 kate
mary 的密码是 mary
欢迎大家在后面跟贴一起来讨论这个题目!

顶
一下吧,多谢了!
[url=http://blog.chinaunix.net/u2/star.php?blogid=64883][/url]
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/64883/showart_526437.html
|
| 发表评论
查看评论(共有条评论)
我要提问
|
| |
|
|
|