On Thu, May 03, 2012 at 02:48:14PM -0400, Mike Erdely wrote:
> FYI: For a test, I added "foo" with useradd(8) and "bar" with adduser(8):
> # grep -E "(foo|bar)" /etc/master.passwd
> foo:*************:1002:1002::0:0::/home/foo:/bin/ksh
> bar:*:1003:1003::0:0:bar:/home/bar:/bin/ksh
> 
> Looks like useradd does the right thing and adduser does not.

With the diff below I added baz:
foo:*************:1002:1002::0:0::/home/foo:/bin/ksh
bar:*:1003:1003::0:0:bar:/home/bar:/bin/ksh
baz:*************:1004:1004::0:0:baz:/home/baz:/bin/ksh

ok?

Index: adduser.perl
===================================================================
RCS file: /cvs/src/usr.sbin/adduser/adduser.perl,v
retrieving revision 1.58
diff -u -p -r1.58 adduser.perl
--- adduser.perl        22 Sep 2011 10:59:23 -0000      1.58
+++ adduser.perl        3 May 2012 19:00:17 -0000
@@ -800,7 +800,7 @@ sub new_users {
        if (&new_users_ok) {
            $new_users_ok = 1;
 
-           $cryptpwd = "*";    # Locked by default
+           $cryptpwd = "*************";        # Locked by default
            $cryptpwd = encrypt($password, &salt) if ($password ne "");
            $log_cl = "" if ($log_cl eq "default");

Reply via email to