#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    1
    Rep Power
    0

    Single line password reset.


    Hi,

    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,
    Margi.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    USA
    Posts
    334
    Rep Power
    11
    The answer is no for a number of reasons. For example
    "--stdin" is not POSIX-compliant command lien argument
    syntax.

    As an aside, using standard utilities such as usermod
    is a better way to handle this sort of thing.

    - Finnbarr

IMN logo majestic logo threadwatch logo seochat tools logo