From owner-freebsd-questions Fri May 17 17:21:38 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id RAA04121 for questions-outgoing; Fri, 17 May 1996 17:21:38 -0700 (PDT) Received: from shell.aros.net (root@shell.aros.net [205.164.111.19]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id RAA04116 for ; Fri, 17 May 1996 17:21:28 -0700 (PDT) Received: (from angio@localhost) by shell.aros.net (8.7.5/Unknown) id SAA02033; Fri, 17 May 1996 18:21:10 -0600 (MDT) From: Dave Andersen Message-Id: <199605180021.SAA02033@shell.aros.net> Subject: Re: where's crypt(1) To: jolp@peerlogic.com (jolp) Date: Fri, 17 May 1996 18:21:10 -0600 (MDT) Cc: questions@FreeBSD.com In-Reply-To: <19c16520@peerlogic.com> from jolp at "May 16, 96 11:01:22 pm" X-Mailer: ELM [version 2.4ME+ PL13 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Lo and behold, jolp once said: > > Is there any way to set a user's password non-interactively? > passwd doesn't seem to work with stdin. Also, the chpass program requires > modules (DES) that have been left out of the 2.1.0 release. We use an expect script to do it. Simple, easy. The only disadvantage is that you can't run this program on a machine that lets users log in, because it shows the password as a command line argument. :-) #!/usr/bin/expect spawn passwd [lindex $argv 0] set password [lindex $argv 1] expect "word:" send "$password\r" expect "word:" send "$password\r" expect eof > Can anyone tell me wher I can get the other modules? You have to install the DES package for FreeBSD. You can download it from ftp.freebsd.org. Just be careful when you install it (search the mailing list archives for more info, there's a ton of material about this topic) > Thanks, > > JO > -- angio@aros.net Complete virtual hosting and business-oriented system administration Internet services. (WWW, FTP, email) http://www.aros.net/ http://www.aros.net/about/virtual "There are only two industries that refer to thier customers as 'users'."