A couple of weeks ago I foolishly substituted the loopback address in
'etc/hosts' for the address and name of my host machine.
The net result, no pun intended, is that I lost all routes to the network
and had to manually add the routes back.
Whether the above is related or not, I don't know. But now everytime I
try to run the "adduser" command, FreeBSD tells me the command isn't
found. But there it is, plain as can be in "usr/sbin". Even though I'm
sitting in the "usr/sbin" directory, I still get a "command not found" error
message each time I issue the command.
What gives?
I've manually added users to the /etc/passwd file and /etc/group file but
when I try to create directories for them, I get an "illegal user" error
message everytime I "chown" them to their proper names.
Any help would be appreciated.
Thanks.
Kinney Baughman
>try to run the "adduser" command, FreeBSD tells me the command isn't
>found. But there it is, plain as can be in "usr/sbin". Even though I'm
>sitting in the "usr/sbin" directory, I still get a "command not found" error
>message each time I issue the command.
>What gives?
Either type ./adduser or /usr/sbin/adduser
or make sure /usr/sbin is in root's PATH
You are doing this as root, right?
An alternative explaination would be that the permissions on adduser
got changed -- do a ls -l /usr/sbin/adduser
to make sure it's executable.
>I've manually added users to the /etc/passwd file and /etc/group file but
>when I try to create directories for them, I get an "illegal user" error
>message everytime I "chown" them to their proper names.
Are you using vipw to add them to /etc/passwd ??
later, david
--
David Hawkins dh...@best.com http://www.river.org/~dhawk
There seems no plan because it's all plan. There seems no center
because it's all center. -- C. S. Lewis
Probably not related. Take a look at your PATH and make sure "/usr/sbin" in
in there. If you are running as root, it is actually *good* that it doesn't
run what it finds in the current directory. This is good security, but if you
are on a guaranteed secure machine, you can add "." to the path if you so
choose, though it does expose you to a security risk, and you do so at your
own risk. At any rate, you can find out if it's in your PATH either by direct
observation (i.e. "echo $PATH"), or "which adduser".
> I've manually added users to the /etc/passwd file and /etc/group file but
> when I try to create directories for them, I get an "illegal user" error
> message everytime I "chown" them to their proper names.
When you 'manually' edit the passwd file are you using the "vipw" command?
If not, (i.e. "vi /etc/passwd"), then you are not really editing the passwd
file... In FreeBSD you should *never, ever* directly edit "/etc/passwd". In
fact, by default the file is readonly to help keep you from doing so. Instead,
simply use "vipw", but beware that the format you get is slightly different
than what's in "/etc/passwd". You'll see a couple of added fields right before
the gecos field.
Good luck,
-Scott
--
________________________________________________________________________
L. Scott Emmons | CableData R&D Center - El Dorado Hills, CA, USA
Sr. Software Engineer | Special Projects, Systems Development Dept
(916) 939-6088 | Views and content are my own, not CableData's
sco...@center.uscs.com | IZCC #2364 '81 280ZX Turbo
: Whether the above is related or not, I don't know. But now everytime I
: try to run the "adduser" command, FreeBSD tells me the command isn't
: found. But there it is, plain as can be in "usr/sbin". Even though I'm
: sitting in the "usr/sbin" directory, I still get a "command not found" error
: message each time I issue the command.
I'll answer my own question for this one.
"Adduser", it turns out, is a Perl script. Upon advice from one my
local net gurus, I took a peek inside "Adduser" and discovered it was
referencing the old version of Perl that I had deleted a couple of weeks
ago when I upgraded to Perl 5.002.
So the "command not found" error message I was getting was referring to
the missing copy of Perl.
Guess I'd better move the new version of Perl to the location of the
old version of Perl before I find other programs having the same problem.
Cheers!
Kinney
>"Adduser", it turns out, is a Perl script. Upon advice from one my
>local net gurus, I took a peek inside "Adduser" and discovered it was
>referencing the old version of Perl that I had deleted a couple of weeks
>ago when I upgraded to Perl 5.002.
>
>Guess I'd better move the new version of Perl to the location of the
>old version of Perl before I find other programs having the same problem.
>
Glad I'm not the only one that did *exactly* as you did! :-)
David
--
-----------------------------------------------------------------------
Home: da...@zhadum.org Mail p...@zhadum.org for my PGP public key
-----------------------------------------------------------------------
Work: man...@cableol.net David B. Mansel BSc (Hons)
Technical Support Specialist
Cable Online
-----------------------------------------------------------------------
oops. I tried rlogin to the loopback address on an NCR 3000 and crashed the
machine (during business hours).
I still don't know what caused that -- but I have never:
a. Lived it down
b. Tried it again :)
>Whether the above is related or not, I don't know. But now everytime I
>try to run the "adduser" command, FreeBSD tells me the command isn't
>found. But there it is, plain as can be in "usr/sbin". Even though I'm
>sitting in the "usr/sbin" directory, I still get a "command not found" error
>message each time I issue the command.
>
>What gives?
>
I had the same problem. I believe if you look, the adduser script is a perl
program. Make sure that the #! /usr/local/bin/perl (or whatever is at the top
of the script) is pointing to the perl executable..
It's perl the script can't find, not adduser.
>I've manually added users to the /etc/passwd file and /etc/group file but
>when I try to create directories for them, I get an "illegal user" error
>message everytime I "chown" them to their proper names.
>
to edit the password file directly, you need to use the vipw command. The
passwd file doesn't contain the passwords, the master.password file does.
>Any help would be appreciated.
>
>Thanks.
>
>Kinney Baughman
see ya
Collin Douglas
Two obvious things to check:
1. Is it executable?
2. Does the interpreter (I'll assume perl) exist where the adduser
script says it will be (like /usr/sbin/perl, or
/usr/local/bin/perl5.0002)
Both of these will cause this error.
--
Dave Burgess (The man of a thousand E-Mail addresses)
*bsd FAQ Maintainer / SysAdmin for the NetBSD system in my spare bedroom
"Just because something is stupid doesn't mean there isn't someone that
doesn't want to do it...."
I think it's in /usr/sbin
go to the directory and type ./adduser
Or, you can put ./ in the system profile and then you can type adduser
------------606C4FD44B040
Content-Transfer-Encoding: 7bit
Content-Description: Card for Richard Windmann
Content-Disposition: attachment; filename="nsmailGK.TMP"
Content-Type: text/x-vcard; charset=us-ascii; name="nsmailGK.TMP"
BEGIN:VCARD
FN:Richard Windmann
N:Windmann;Richard
ORG:Telegroup, Inc.
ADR:;;505 North 3rd ;Fairfield;IA;52556
EMAIL;INTERNET:rich...@mail.telegroup.com
TITLE:Internet/Intranet Administrator
TEL;WORK:515-472-5000, 2564
TEL;FAX:515-472-4747
TEL;HOME:515-472-3084
X-MOZILLA-HTML:F
END:VCARD
------------606C4FD44B040--