Subject: Minor /etc/security problems
To: None <tech-security@netbsd.org>
From: Marc Baudoin <babafou@babafou.eu.org>
List: tech-security
Date: 12/30/1998 14:55:23
Hi,

I've just installed NetBSD 1.3.3 and I've noticed various
problems which can be classified as security-related though non
critical.

First, there are what I consider to be junk entries in the passwd
file:

toor:*:0:0:Bourne-again Superuser:/root:/bin/sh
ingres:*:267:74:& Group:/usr/ingres:/sbin/nologin
falken:*:32766:31:Prof. Stephen &:/usr/games:/usr/games/wargames

It's generally a bad idea to have multiple root accounts and
/etc/security complains about this:

/etc/master.passwd has duplicate user id's.
root 0  toor 0

It also complains about this:

Checking the /etc/master.passwd file:
Login toor is off but still has a valid shell (/bin/sh)
Login operator is off but still has a valid shell (/bin/csh)

Why not, in the next release, disable account operator
(/sbin/nologin shell) and maybe deleting completely the toor,
ingres and falken accounts (which are, IMHO, of no use)?

More generally, I think accounts and groups which don't possess
at least one file in a full installation should be removed.

Another minor problem: mtree complains about some permissions:

Checking special files and directories.
var/account/acct:
        permissions (0644, 0600)
etc/sendmail.cf:
        permissions (0644, 0444)

/etc/sendmail.cf has been installed this way by sysinst.  It
would be consistent to have its permissions the same as those
mtree wants.

About /var/account/acct, I created it 600 because I think using
lastcomm is nobody's business but root's.  It would certainly
enhance security to have mtree think the same and warn the
administrator if /var/account/acct is 644.  Especially since
/etc/security uses a 077 umask ans thus sa creates the
/var/account/{savacct,usracct} files 600.  What's your opinion?