From owner-freebsd-questions@FreeBSD.ORG Wed Jun 11 07:59:00 2008 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 42A1B106566B for ; Wed, 11 Jun 2008 07:59:00 +0000 (UTC) (envelope-from nvass@teledomenet.gr) Received: from wmail.teledomenet.gr (wmail.teledomenet.gr [213.142.128.16]) by mx1.freebsd.org (Postfix) with ESMTP id 0192D8FC20 for ; Wed, 11 Jun 2008 07:58:59 +0000 (UTC) (envelope-from nvass@teledomenet.gr) Received: by wmail.teledomenet.gr (Postfix, from userid 1002) id CD1601C80F4; Wed, 11 Jun 2008 10:58:58 +0300 (EEST) X-Spam-Checker-Version: SpamAssassin 3.1.7-deb (2006-10-05) on wmail.teledomenet.gr X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.1.7-deb Received: from iris.teledomenet.local (unknown [192.168.1.71]) by wmail.teledomenet.gr (Postfix) with ESMTP id D01B51C80F5; Wed, 11 Jun 2008 10:58:48 +0300 (EEST) From: Nikos Vassiliadis To: freebsd-questions@freebsd.org, z.szalbot@lc-words.com Date: Wed, 11 Jun 2008 10:56:42 +0300 User-Agent: KMail/1.9.7 References: <484F7CBE.5060401@lc-words.com> In-Reply-To: <484F7CBE.5060401@lc-words.com> X-NCC-RegID: gr.telehouse MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200806111056.42848.nvass@teledomenet.gr> Cc: Subject: Re: generating random passwords 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: Wed, 11 Jun 2008 07:59:00 -0000 On Wednesday 11 June 2008 10:20:30 Zbigniew Szalbot wrote: > Excuse me my ignorance. Is there a utility in FreeBSD that would allow > me to generate random passwords without actually creating any accounts > or modifying existing ones? I am looking for something to allow me to > generate a random string of characters. I know I can randomly hit the > keyboard but if anything like that exists, many thanks for your advice. > :) That's a common problem I have, and most of the times I was on relying on BASH's $RANDOM. Just thought of this: sed -n 's/[^a-zA-Z0-9~`!@#$%^&*()_+=-|\]//g; /^\(.\{10\}\).*/{ s//\1/p; q; }; b' /dev/urandom HTH, Nikos