OTP feature for /bin/login

Guylhem busybox at guylhem.net
Wed May 9 00:08:19 UTC 2012


Hello

On Tue, May 8, 2012 at 6:56 PM, Rich Felker <dalias at aerifal.cx> wrote:
> A *good* OTP system (I'm not sure how good the submitted one is)
(...)
> you need a way to present the challenge to the user when
> they attempt to login (so they can enter it in their device).

Have you actually *read* the submitted code?
You are describing the pin, and displaying the pin while waiting for
the user response.

Check line #135 :
  challenge=("Password or OTP-MD5 Challenge %s @ %d: ", pin, otpepoch);
  unencrypted = bb_ask_stdin(challenge);

At the moment, I'm wondering who else is discussing the MOTP feature
without having read the code, or at least checked the links including
the MOTP shell script implementations on motp.sf.net (no C fluency
required)

There are many speculations on what OTP should be or how it could be
done differently, in ways either complex or introducing possible
vulnerabilities.

That's very interesting, but all I am proposing is a minimalistic
robust working MOTP integration right into /bin/login, with full
compatibility in traditional password handling, full compatibility
with currently existing MOTP generators, along with enough flexibility
if needed to further enhance security (for exemple to deliver pins by
different channels, etc).

Maybe that's the mistake I made - I should never ever have asked for
feature feedback and have addressed that in a 2nd version instead.

I am sorry if the proposed code is considered as lacking features by
some or as having too many features by others.

I is just a vanilla MOTP verifier, with the parts to handle edge case
(pinless OTPs) removed for the sake of simplicity - what I called the
busybox spirit.

If there is a policy that it should be an alternative /bin/login, it
can be done - even if it strikes me as useless code duplication since
it only requires 3 ifdefs in correct_password.c - just one more than
the ENABLE_FEATURE_SHADOWPASSWDS.

Through ifdefs or a separe /bin/login, I would just really really
appreciate to have a straightforward and standard way to avoid
exposing password when telnetting to a system running a statically
compiled busybox - and I guess that could be usefull to others.


More information about the busybox mailing list