Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Dec 2002 21:02:50 +0100
From:      Norbert Koch <viteno@t-online.de>
To:        Cliff Sarginson <cls@raggedclown.net>
Cc:        FreeBSD Questions <FreeBSD-questions@FreeBSD.org>
Subject:   Re: adduser
Message-ID:  <vzsmwga905.fsf@viteno.dyns.net>
In-Reply-To: <20021229195120.GA883@raggedclown.net> (Cliff Sarginson's message of "Sun, 29 Dec 2002 20:51:20 %2B0100")
References:  <20021229185302.GA291@raggedclown.net> <12925226463.20021229203158@dds.nl> <20021229195120.GA883@raggedclown.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Cliff Sarginson <cls@raggedclown.net> writes:

> I tried the simple act of adding a user to my system.
> It failed, repeatingly asking me for a user name I had already given.
> You should not have to have the brain of Einstein in order to put a new
> user on your system.

You misunderstood the first part of adduser which is the configuration
part (done once).  Here's a sample session from my machine:

# adduser
,----[ configuration part ]
| /etc/adduser.conf: No such file or directory
| Use option ``-silent'' if you don't want to see all warnings and questions.
| 
| Check /etc/shells
| Check /etc/master.passwd
| Check /etc/group
| Usernames must match regular expression: 
| [^[a-z0-9_][a-z0-9_-]*$]: 
| Enter your default shell: bash csh date no sh tcsh zsh [sh]: bash
| Your default shell is: bash -> /usr/local/bin/bash
| Enter your default HOME partition: [/home]: /usr/users
| Copy dotfiles from: /usr/share/skel no [/usr/share/skel]: 
| Send message from file: /etc/adduser.message no 
| [/etc/adduser.message]: 
| Use passwords (y/n) [y]: 
| 
| Write your configuration to /etc/adduser.conf? (y/n) [y]: 
`----

Ok, let's go.
Don't worry about mistakes. I will give you the chance later to correct any input.

,----[ first entered user ]
| Enter username [^[a-z0-9_][a-z0-9_-]*$]: testuser
| Enter full name []: Test User   
| Enter shell bash csh date no sh tcsh zsh [bash]: 
| Enter home directory (full path) [/usr/users/testuser]: 
| Uid [1000]: 
| Enter login class: default []: 
| Login group testuser [testuser]: 
| Login group is ``testuser''. Invite testuser into other groups: guest no 
| [no]: 
| Enter password []: 
| Enter password again []: 
| 
| Name:     testuser
| Password: ****
| Fullname: Test User
| Uid:      1000
| Gid:      1000 (testuser)
| Class:    
| Groups:   testuser 
| HOME:     /usr/users/testuser
| Shell:    /usr/local/bin/bash
| OK? (y/n) [y]: 
`----


So, you should keep the regexp at the beginning and set up a
adduser.conf according to your needs.  The rest is mainly hitting the
return key.

norbert.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?vzsmwga905.fsf>