From owner-freebsd-questions@FreeBSD.ORG Thu Dec 23 12:56:02 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 85A6B106564A for ; Thu, 23 Dec 2010 12:56:02 +0000 (UTC) (envelope-from igorr@canmos.ru) Received: from sta1.canmos.ru (sta1.canmos.ru [89.107.124.11]) by mx1.freebsd.org (Postfix) with ESMTP id 41DC88FC15 for ; Thu, 23 Dec 2010 12:56:02 +0000 (UTC) Received: from sta1.canmos.ru (sta1.canmos.ru [89.107.124.11]) by sta1.canmos.ru (Postfix) with ESMTP id 879C81273C6; Thu, 23 Dec 2010 15:56:00 +0300 (MSK) Date: Thu, 23 Dec 2010 15:55:58 +0300 (MSK) From: "Igor V. Ruzanov" To: itpr0 In-Reply-To: Message-ID: References: X-GPG-PUBLIC-KEY: 1024D/494AF6DC 2008-03-20 Igor V. Ruzanov X-GPG-FINGERPRINT: A723 B6CC 11ED A4E2 1909 C4DC 6EDE 9089 494A F6DC MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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:56:02 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 23 Dec 2010, itpr0 wrote: |Hi list, | |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. | |Some coworkers told to just remove the lines from /etc/passwd and |/etc/master.passwd... I did that but the user still can authenticate. | |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.. | |I tried rmuser and here is the return: | |# rmuser XXX |Matching password entry: | |XXX:*:20887:1014::0:0:XXXXX XXXXX:/home/XXX:/nonexistent | |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 file |or directory | One of simpliest ways to remove user is the `vipw' command. vipw opens master.passwd file in vi editor. After removing nesessary string vipw rebuild user's database. After that your can just remove user's home directory and even say locate.updatedb if you don't want to see removed user via `locate' :) +-------------------------------------------+ ! CANMOS ISP Network ! +-------------------------------------------+ ! Best regards ! ! Igor V. Ruzanov, network operational staff! ! e-Mail: igorr@canmos.ru ! +-------------------------------------------+ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQFNE0bgbt6QiUlK9twRAjFEAJ9MHSy2UmmoGjSYyvgebD/eZqaqpACfWECI cCXL5qFCI4CWMb/+kJGK+JU= =Pp4z -----END PGP SIGNATURE-----