whither 1.00's "passwd -p ..." ?

Tito farmatito at tiscali.it
Tue Jul 3 20:17:10 UTC 2007


On Tuesday 03 July 2007 15:23:06 Jim Freeman wrote:
> busybox 1.00 (and other versions?) had a "-p" option to allow setting
> a user's password bypassing the interactive mode
> 
> 	# passwd fu
> 	Changing password for fu
> 	New password:
> 	Retype password:
> 	Password for fu changed by root
> 
> vs.
> 	# passwd -p **** blip
> 	Setting password for blip
> 	Password changed.
> 
> 
> My CGI backends to do remote management on an embedded machine have
> been using this, but it now fails with current busybox, and no
> shell trickery I can conjure (echo/pipe, HERE doc ...) works,
> and nothing expect-ish is available to work with on the box.
> 
> For now I kludge around the lack by emulating the example at
> http://www.unixguide.net/unix/faq/3.9.shtml (substituting
> "ptyget" for "pty").
> 
> Aside from the /proc/.../cmdline (and other?) security concerns
> (largely moot for many embedded scenarios), is there a reason
> this functionality has been removed?
> 
> Anyone clued in to the reasoning/history of this change (didn't see
> anything on the lists)?  Any hope for it's restoration?
> 
> Thanks,
> ...jfree
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/cgi-bin/mailman/listinfo/busybox
> 
Maybe it was ripped out as it is non standard?
 
OPTIONS
       The options which apply to the passwd command are:

       -a, --all
          This option can be used only with -S and causes show status for all
          users.

       -d, --delete
          Delete a user’s password (make it empty). This is a quick way to
          disable a password for an account. It will set the named account
          passwordless.

       -e, --expire
          Immediately expire an account’s password. This in effect can force a
          user to change his/her password at the user’s next login.

       -h, --help
          Display help message and exit.

       -i, --inactive INACTIVE
          This option is used to disable an account after the password has
          been expired for a number of days. After a user account has had an
          expired password for INACTIVE days, the user may no longer sign on
          to the account.

       -k, --keep-tokens
          Indicate password change should be performed only for expired
          authentication tokens (passwords). The user wishes to keep their
          non-expired tokens as before.

       -l, --lock
          Lock the named account. This option disables an account by changing
          the password to a value which matches no possible encrypted value.

       -m, --mindays MIN_DAYS
          Set the minimum number of days between password changes to MIN_DAYS.
          A value of zero for this field indicates that the user may change
          his/her password at any time.

       -q, --quiet
          Quiet mode.

       -r, --repository REPOSITORY
          change password in REPOSITORY repository

       -S, --status
          Display account status information. The status information consists
          of 7 fields. The first field is the user’s login name. The second
          field indicates if the user account is locked (L), has no password
          (NP), or has a usable password (P). The third field gives the date
          of the last password change. The next four fields are the minimum
          age, maximum age, warning period, and inactivity period for the
          password. These ages are expressed in days.

       -u, --unlock
          Unlock the named account. This option re-enables an account by
          changing the password back to its previous value (to value before
          using -l option).

       -w, --warndays WARN_DAYS
          Set the number of days of warning before a password change is
          required. The WARN_DAYS option is the number of days prior to the
          password expiring that a user will be warned that his/her password
          is about to expire.

       -x, --maxdays MAX_DAYS
          Set the maximum number of days a password remains valid. After
          MAX_DAYS, the password is required to be changed.

Ciao,
Tito




More information about the busybox mailing list