January 19th, 2004, 06:28 AM
Single line password reset.
I need to know if this command
echo NEWPASSWORD | passwd --stdin USERNAME
that works fine on Red Hat Linux, is also available on other Unix/Linux machines (AIX, FreeBSD, OpenBSD, SunOS, Mandrake, Debian, Gentoo, Lindows, Slackware, Xandros, HP-UX, IRIX, SCO, MacOS, BSDi ...).
Thanks in advance,
January 19th, 2004, 10:39 AM
The answer is no for a number of reasons. For example
"--stdin" is not POSIX-compliant command lien argument
As an aside, using standard utilities such as usermod
is a better way to handle this sort of thing.