This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / 请教:如何在RHLinux下用shell scirpt or perl 自动加password? 在线等。i have around 250 account to add, i don't want to add one by one, special for passwd, someone has any idea to do this under RH Linux.
any help wil be appreciated.
thanks
-redspider(忙啥!歇着吧!);
2003-2-13
{176}
(#1039519@0)
-
# for (( i=0; i<250; i++ )); do useradd test$i -p test$i; done
-gettext(gettext);
2003-2-13
(#1039548@0)
-
useradd -p is not for passwd, i tried, it just didn't work. anyone know well expect(1) or a program call pty?
-redspider(忙啥!歇着吧!);
2003-2-13
(#1039698@0)
-
也许能有点帮助useradd -p passwd user
但是passwd不是你的password, 你的password是加密之后的
then modify your passwd
echo passwd |passwd --stdin user
-oasis(oasis);
2003-2-13
{135}
(#1039778@0)
-
humm, sounds interesting, i will look on it. i found the solution, detail see inside. thanks gettext and oasis
-redspider(忙啥!歇着吧!);
2003-2-13
{884}
(#1039949@0)
-
I find expect is not a shell command, now, I know why, thanks for your sharing.
-oasis(oasis);
2003-2-13
(#1040010@0)