脚本修改linux用户密码

三月 29th, 2010 Posted in Centos | 阅读次数: 350 次

Author:gaojinbo
Time:2010-3-29

很多时候,我们需要在脚本里面添加用或修改用户密码,其实很简单,只需要2个命令,然后通过管道即可实现

如下:

echo "root:gjb888"|chpasswd

Done!

相关日志:

Tags:

3 Responses to “脚本修改linux用户密码”

  1. Natural Remedies for Anxiety Says:

    Favourite Sites…

    [...]I like to honor other websites on the web, even if they are not related to my site, by linking to them. Below are some websites I think are worth checking out http://www.panicattackstreatmentcure.net/links/…...


  2. yeast infection home remedies Says:

    My Recommended Websites…

    [...]some new websites on the web we love, even if they are not related to ours. Check them out[...]…


  3. bugbeta Says:

    谢谢,找了半天,别的地方都使用
    echo “123 “|passwd –stdin user
    但我在debian下不成功,说没有 –stdin选项,不知道为什么,直到找到你这文章,一下就好了。


留下您的脚印