From owner-freebsd-questions@FreeBSD.ORG Tue Aug 30 18:39:35 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C02D1065672 for ; Tue, 30 Aug 2011 18:39:35 +0000 (UTC) (envelope-from kudzu@tenebras.com) Received: from mail-ey0-f172.google.com (mail-ey0-f172.google.com [209.85.215.172]) by mx1.freebsd.org (Postfix) with ESMTP id B918B8FC19 for ; Tue, 30 Aug 2011 18:39:34 +0000 (UTC) Received: by eye4 with SMTP id 4so4385593eye.31 for ; Tue, 30 Aug 2011 11:39:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.14.13.14 with SMTP id a14mr2226492eea.41.1314729573479; Tue, 30 Aug 2011 11:39:33 -0700 (PDT) Received: by 10.14.97.77 with HTTP; Tue, 30 Aug 2011 11:39:33 -0700 (PDT) In-Reply-To: References: <4E5D28E0.5050700@gmail.com> Date: Tue, 30 Aug 2011 11:39:33 -0700 Message-ID: From: Michael Sierchio To: Michael Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-questions@freebsd.org" Subject: Re: random generated password X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2011 18:39:35 -0000 Sorry, typo in cut-and-paste. # dd if=3D/dev/random count=3D1 | tr -c "[:alnum:]" '0-9A-Za-z0-9A-Za-z0-9A-Za-z' ; echo zNvPGEVzCZ0QQRMUjtzcJJXRlKNPfVFCTEol0pdPmGEyzFiEUx0PUjPYMdUUYklbKPICmhS9IJE= nxg4aaLVojizk6bjznuvzfLfAR4dfzX4nKfNqCAmVR13LZ08aUZzGyxW2jWNV9oBDBhcPQRmC2n= zoEtCIE2PQdS5V2FIixBKjrB05nDnwMAfjzpVKQ7ft4GUsXNyAve9OIl3PUUTecezldocgvWrSF= fbI8ztXw9zP2Ka9Gu39jFULWbLYwqNfzDMVOy76nPEWA9DfeT5yUrSO9fSyREAes7XxSbYvcyuz= ahBdqBaySc4EIgRQDBFqRxJ6hzbY7dg98HtcQzoWSrCgf2SA6VJwLivtld3eCddIz5HZIjcHUqI= SzFXMLnOPszV627zGhOm5Ei7diTQbf8GZQ3ZD8r7yY2ao9Mbm9w16nCt5issPD2toxoKSdqaNWY= HbTCqEhXineHmQPwX9z1qDFZkM7B20FecLS5ECKe8yH7iSlIiFDCbAbFNVJ1PP # I'll leave it to you to pick out 9 chars for the seed and 31 chars for the rest, as in $1$zNvPGEVzC$Z0QQRMUjtzcJJXRlKNPfVFCTEol0pdP On Tue, Aug 30, 2011 at 11:34 AM, Michael Sierchio wro= te: > dd if=3D/dev/random count=3D1 | tr -c "[:alnum:]" > '0-9A-Za-z0-9A-Za-z0-9A-Za-a-z0-9A-Za-z' > > will give you the right kind of characters to use, for example. > > On Tue, Aug 30, 2011 at 11:32 AM, Michael Sierchio w= rote: >> Presumably you're doing this to prevent direct login? >> >> chpass allows root to set the encrypted password directly >> >> chpass -p '$1$123456789$your-random-chars-here' >> >> >> On Tue, Aug 30, 2011 at 11:16 AM, Michael wrote: >>> Hello, >>> >>> When adding a new user it is possible to assign a random generated pass= word. >>> But is it possible to assign a random password for already existing use= rs? >>> >>> Preferably in a non-interactive and scriptable way. Is it possible with= the >>> base system tools? >>> >>> Michael >>> >>> _______________________________________________ >>> freebsd-questions@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >>> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd= .org" >>> >> >