adduser question
Jez Hancock
jez.hancock at munk.nu
Sun Jun 29 19:22:05 PDT 2003
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
More information about the freebsd-questions
mailing list