From owner-freebsd-questions@FreeBSD.ORG Thu Dec 23 12:50:26 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A84D4106564A for ; Thu, 23 Dec 2010 12:50:26 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr6.xs4all.nl (smtp-vbr6.xs4all.nl [194.109.24.26]) by mx1.freebsd.org (Postfix) with ESMTP id 285B08FC12 for ; Thu, 23 Dec 2010 12:50:25 +0000 (UTC) Received: from slackbox.erewhon.net (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr6.xs4all.nl (8.13.8/8.13.8) with ESMTP id oBNCoOJw005532; Thu, 23 Dec 2010 13:50:24 +0100 (CET) (envelope-from rsmith@xs4all.nl) Received: by slackbox.erewhon.net (Postfix, from userid 1001) id 628C4BAC3; Thu, 23 Dec 2010 13:50:24 +0100 (CET) Date: Thu, 23 Dec 2010 13:50:24 +0100 From: Roland Smith To: itpr0 Message-ID: <20101223125024.GA6231@slackbox.erewhon.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="y0ulUmNC+osPPQO6" Content-Disposition: inline In-Reply-To: X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-questions@freebsd.org Subject: Re: Completely remove user from system X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Dec 2010 12:50:26 -0000 --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 23, 2010 at 10:06:31AM -0200, itpr0 wrote: > Hi list, >=20 > We are using postfix with system user authentication, I have to completely > remove an user for the system so he couldn't auth to send e-mails. >=20 > Some coworkers told to just remove the lines from /etc/passwd and > /etc/master.passwd... I did that but the user still can authenticate. >=20 > using "pw user show XXX" returns that still have a register from the user > XXX but trying the "pw user del XXX" it says there is no such user.. >=20 > I tried rmuser and here is the return: >=20 > # rmuser XXX > Matching password entry: >=20 > XXX:*:20887:1014::0:0:XXXXX XXXXX:/home/XXX:/nonexistent >=20 > Is this the entry you wish to remove? y > Remove user's home directory (/home/XXXX)? y > Removing user (XXX): home passwdpw: user 'XXX' does not exist: No such fi= le > or directory >=20 > There is any other thing that I can do to completely remove this user? It= 's > urgent 'cos it's sending a lot of spam mails :( and our server administra= tor > is on vacation :/ > Thank you. After modifying /etc/master.passwd, you need to run pwd_mkdb(8): pwd_mkdb /etc/master.passwd Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --y0ulUmNC+osPPQO6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAk0TRZAACgkQEnfvsMMhpyXIhgCcDEoHRIsbPJspkIYALoVBvaZt mbsAn3aM71vGx3FS7z3U2zERK0srAwWb =/0lp -----END PGP SIGNATURE----- --y0ulUmNC+osPPQO6--