On Tue, Sep 26, 2017 at 11:18:22AM +0300, Valentine Astakhov wrote:

> login: vall
> password: [I press Enter there]
> Hallo!
> $
> 
> Can I login without password prompt?

No. But if it's a pet peeve of yours, you could patch it like this.

Also, you can use specific login programs for specific ttys, see
gettytab(5).

Daniel


Index: usr.bin/login/login.c
===================================================================
RCS file: /cvs/src/usr.bin/login/login.c,v
retrieving revision 1.68
diff -u -p -u -r1.68 login.c
--- usr.bin/login/login.c       21 Aug 2016 03:26:04 -0000      1.68
+++ usr.bin/login/login.c       26 Sep 2017 13:09:25 -0000
@@ -447,6 +447,12 @@ main(int argc, char *argv[])
                backoff = (int)login_getcapnum(lc, "login-backoff", 3, 3);
 
                /*
+                * Don't prompt for empty password.
+                */
+               if (pwd && !pwd->pw_passwd[0])
+                       fflag = 1;
+
+               /*
                 * Turn off the fflag if we have an invalid user
                 * or we are not root and we are trying to change uids.
                 */

Reply via email to