From owner-freebsd-questions@FreeBSD.ORG Sun Jun 29 19:22:05 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 987A437B401 for ; Sun, 29 Jun 2003 19:22:05 -0700 (PDT) Received: from munk.nu (213-152-51-194.dsl.eclipse.net.uk [213.152.51.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA76943FF7 for ; Sun, 29 Jun 2003 19:22:02 -0700 (PDT) (envelope-from munk@munk.nu) Received: from munk by munk.nu with local (Exim 4.20) id 19WoIq-000B62-QO for freebsd-questions@freebsd.org; Mon, 30 Jun 2003 03:22:00 +0100 Date: Mon, 30 Jun 2003 03:22:00 +0100 From: Jez Hancock To: "freebsd-questions@freebsd.org" Message-ID: <20030630022200.GA41348@users.munk.nu> Mail-Followup-To: "freebsd-questions@freebsd.org" References: <1056934375.688.37.camel@farm-libranet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1056934375.688.37.camel@farm-libranet> User-Agent: Mutt/1.4.1i Sender: User Munk Subject: Re: adduser question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 02:22:05 -0000 On Sun, Jun 29, 2003 at 05:52:53PM -0700, Marvin J. Kosmal wrote: > When I type adduser > > I get the regular first three lines. > > Check /etc/shells > Check /etc/master.pwd > Check /etc/group > > Usernames must match regulare expression: [mkosmal]: iirc, the first time you run adduser it prompts you to enter the default settings you want it to use in future (here you've chosen to allow only usernames that contain the characters mkosmal - probably not what you wanted). The best thing to do would be to do: mv /etc/adduser.conf /etc/adduser.conf.bak and then run adduser as root again.allow only usernames that contain the characters mkosmal - probably not what you wanted). The best thing to do would be to do: mv /etc/adduser.conf /etc/adduser.conf.bak and then run adduser as root again, but this time run it as: adduser -silent This will stop adduser from asking you for defaults and instead will work it out from it's default settings. > That last line must come from an aborted prior attempt. Yes, perhaps you thought it was prompting you for the username of the user you wanted to add to the system (which ends up being taken as the regular expression to describe what valid usernames should be). > It just gets worse after that. > > In /usr/sbin > the adduser script is in part > > Copyright 1995-1996 Wolfram Schneider etc. yada. yada.. yada.. If you mean you edited the file /usr/sbin/adduser, that's because the adduser program is a perl script! If you read through it you can work out how adduser works :) > > > I am using a disk that came with Teach Yourself FreeBSD in 24 hours.. > > > > I tried editing the following files by had > > /etc/passwd. > /etc/master.pwd > /etc/group Not a good idea unless you know what you're doing. After editing /etc/master.passwd by hand (NOT /etc/passwd) you then need to run another utility, pwd_mkdb, to rebuild the system password database. Read the man pages thoroughly before attempting that, try: man -k passwd to see a list of relevant manpages. A better password management system is 'pw' - make sure you type pw add -D first to setup your defaults. To add a user do: pw adduser youruser -m which creates 'youruser' and a set of skeleton files in their home directory (/home by default). Good luck, Jez