From owner-freebsd-questions@freebsd.org Sun Aug 16 20:48:32 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3AB463C5AB0 for ; Sun, 16 Aug 2020 20:48:32 +0000 (UTC) (envelope-from list1@gjunka.com) Received: from msa1.earth.yoonka.com (yoonka.com [88.98.225.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "msa1.earth.yoonka.com", Issuer "msa1.earth.yoonka.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BV8Ql06Drz3XVn for ; Sun, 16 Aug 2020 20:48:30 +0000 (UTC) (envelope-from list1@gjunka.com) Received: from venus.yoonka.com (venus.yoonka.com [10.70.7.24]) (authenticated bits=0) by msa1.earth.yoonka.com (8.15.2/8.15.2) with ESMTPSA id 07GKmMGO089708 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sun, 16 Aug 2020 20:48:23 GMT (envelope-from list1@gjunka.com) Subject: Re: Verify user password To: Arthur Chance , freebsd-questions@freebsd.org References: <0567033d-fa75-06b2-5629-448fdc507242@qeng-ho.org> <091dca7e-28ab-eab0-7265-d0439a732d86@gjunka.com> From: Grzegorz Junka Message-ID: Date: Sun, 16 Aug 2020 20:48:22 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1597610911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=km2KjtJgtAUmApsp01+kLTjxAc/2wH4nIXmnAKdHUzo=; b=RlfFLwe0qT7cwVbSV8Azle0glrR+aDHlqjzA8NiApukGOEdo4z8/Hj6L1Oc/d/JiK+le0v Q4Oh5dV74Ub5NUblNKFM96klTRiMAp4HduVMu2fcXNek+xdp5ISr0sJpiwwt6ZL0nHlF9A n//6Q5B832Az/NpNI5EoY3s+aNwtH0F70OxiWF8Dvdhz1OI5P83nabJDyqhpYJB8H9Vyfh ahdhJq0NXxA6a8oTtg/Ci0B7GBcyawEEsC8eY5KpR3sRCAlCPiN12o8uJh27u7PKZRVM/G xAQRFSpfw78ffzeiKuOn5tmAdUA9kLJRP++AlBuk8TkCrHmRSAU/8Q2gqYZwEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1597610911; a=rsa-sha256; cv=none; b=momHrHayRF7tiTZTW6gtVYJQdirEC3wBEqtjLUfnCwH7SD5/rsPiq0ES+YcEcBKribTPNN vODclkwcR1iYy3w9SIN5dj1P70eE+GNYkxnYvcr6Aovh0yT/jrq0Ww87uJU7PK4VaDaCiX 1OdTIJ3CB7kGfR7t6sWRUuRvIFGvkBUn6dS/7na1K0Q0G+CTMxvH/URI2lbbkSRzlayZYM 9DiBdXoa45Z/sjbrAzF+fc1vqV72syQ11fm2do+tUv890vvzzrQxcoW0XU1v7BSkJpZykI rwS9luXEXAv8V6OSHHhmem9TDlaiRpOiklidKjejX0VrhMpICwbn+nZDStxI6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of list1@gjunka.com designates 88.98.225.149 as permitted sender) smtp.mailfrom=list1@gjunka.com X-Rspamd-Queue-Id: 4BV8Ql06Drz3XVn X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of list1@gjunka.com designates 88.98.225.149 as permitted sender) smtp.mailfrom=list1@gjunka.com X-Spamd-Result: default: False [-2.86 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:88.98.225.149]; NEURAL_HAM_LONG(-1.00)[-0.996]; MIME_GOOD(-0.10)[text/plain]; ARC_SIGNED(0.00)[i=1]; DMARC_NA(0.00)[gjunka.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.53)[-0.526]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-1.04)[-1.035]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:56478, ipnet:88.98.192.0/18, country:GB]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Aug 2020 20:48:32 -0000 On 16/08/2020 13:09, Arthur Chance wrote: > On 16/08/2020 12:03, Grzegorz Junka wrote: >> On 15/08/2020 13:31, Arthur Chance wrote: >>> On 15/08/2020 13:39, Grzegorz Junka wrote: >>>> How can I verify if a given password matches the password stored in >>>> master.passwd database for a user account that is set up with >>>> /nonexistent and /usr/sbin/nologin (so a user that can't normally login >>>> to the system but still can have a password stored in the database)? >>> nologin doesn't stop you logging in, it merely says the account isn't >>> available and boots you out afterwards, so you should be able to check >>> the password by trying to log in. I don't think the non-existent home >>> directory affects that, >> >> OK, how can I login with that user then? "su" that user returns "This >> account is currently not available". "login" that user says "Not a login >> shell.". The user is configured inside a jail and there is no sshd running. > Try using /usr/bin/login, not just "login" which is a shell builtin. OK, thank worked! Thank you very much Arthur