From unknown Wed Sep 10 20:06:19 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#48894 <48894@debbugs.gnu.org> To: bug#48894 <48894@debbugs.gnu.org> Subject: Status: ambiguous descriptions of logname and whoami Reply-To: bug#48894 <48894@debbugs.gnu.org> Date: Thu, 11 Sep 2025 03:06:19 +0000 retitle 48894 ambiguous descriptions of logname and whoami reassign 48894 coreutils submitter 48894 Christoph Anton Mitterer severity 48894 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 06 21:49:59 2021 Received: (at submit) by debbugs.gnu.org; 7 Jun 2021 01:49:59 +0000 Received: from localhost ([127.0.0.1]:54188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lq4Ot-00007Z-MK for submit@debbugs.gnu.org; Sun, 06 Jun 2021 21:49:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:57354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lq4Op-00007P-4A for submit@debbugs.gnu.org; Sun, 06 Jun 2021 21:49:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56070) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lq4Oo-0002tB-FR for bug-coreutils@gnu.org; Sun, 06 Jun 2021 21:49:54 -0400 Received: from cyan.elm.relay.mailchannels.net ([23.83.212.47]:28105) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lq4Om-0000pP-Aq for bug-coreutils@gnu.org; Sun, 06 Jun 2021 21:49:54 -0400 X-Sender-Id: instrampxe0y3a|x-authsender|calestyo@scientia.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id AC333781681 for ; Mon, 7 Jun 2021 01:49:42 +0000 (UTC) Received: from mailgw-01.dd24.net (100-96-18-89.trex.outbound.svc.cluster.local [100.96.18.89]) (Authenticated sender: instrampxe0y3a) by relay.mailchannels.net (Postfix) with ESMTPA id 25CAD78183C for ; Mon, 7 Jun 2021 01:49:30 +0000 (UTC) X-Sender-Id: instrampxe0y3a|x-authsender|calestyo@scientia.net Received: from mailgw-01.dd24.net (mailgw-01.dd24.net [193.46.215.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.18.89 (trex/6.3.1); Mon, 07 Jun 2021 01:49:42 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: instrampxe0y3a|x-authsender|calestyo@scientia.net X-MailChannels-Auth-Id: instrampxe0y3a X-Stupid-Inform: 20d5f89322b2a5cc_1623030571772_1773648085 X-MC-Loop-Signature: 1623030571772:2461127727 X-MC-Ingress-Time: 1623030571772 Received: from heisenberg.fritz.box (ppp-88-217-47-84.dynamic.mnet-online.de [88.217.47.84]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: calestyo@scientia.net) by smtp.dd24.net (Postfix) with ESMTPSA id 489205FC32 for ; Mon, 7 Jun 2021 01:49:29 +0000 (UTC) Message-ID: <02020362ea3fb067535a25eb288b03a0ee61a55f.camel@scientia.net> Subject: ambiguous descriptions of logname and whoami From: Christoph Anton Mitterer To: bug-coreutils@gnu.org Date: Mon, 07 Jun 2021 03:49:28 +0200 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Received-SPF: none client-ip=23.83.212.47; envelope-from=calestyo@scientia.net; helo=cyan.elm.relay.mailchannels.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hey. Man page of logname say: "Print the name of the current user." IMO that's ambiguous as it's probably ought to be the name returned by getlogin(). So when I login as normal user, and "su -" to root, logname won't print "root" but the normal user. However, what most people will understand under the "the current user" would be root, in that case. Man AND info pages of whoami say: "print effective userid" However, it's the user name, that is printed, not the userid (which most people will understand as the numerical UID). Cheers, Chris. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 15 10:28:50 2021 Received: (at 48894-done) by debbugs.gnu.org; 15 Sep 2021 14:28:50 +0000 Received: from localhost ([127.0.0.1]:52822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQVu5-0008Fo-SK for submit@debbugs.gnu.org; Wed, 15 Sep 2021 10:28:50 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:34459) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQVu2-0008FZ-1z for 48894-done@debbugs.gnu.org; Wed, 15 Sep 2021 10:28:48 -0400 Received: by mail-wm1-f46.google.com with SMTP id v20-20020a1cf714000000b002e71f4d2026so3998898wmh.1 for <48894-done@debbugs.gnu.org>; Wed, 15 Sep 2021 07:28:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=hEBPP9Xi/ZZzIFEsEYpZ0vyaruST8+I2bnQ0HWzxFEk=; b=YBTVYRY9a6kklPy29brTWHrREBfp73gvJaMaJyv9QwYgeflykJ7X2zgo6VOZEev7xJ eZ2QfsFmT3diEDPbqBgwjBx8twf5BBHVJuHJ1d8STXtAMXMCMq+pcauAhZTWI58NgvZ6 esau3NtQyzLNNGEjMBPut1mZM0niS8GL9QgZkPEtb3fzsAKed86MSY5wqVQDy2JPSO+0 CnxC5DCT17fGvu12RYWjDNeeCkRKUU0Q4rbfhwlpW3Zrmnj+dAqflwFIFTrd7f+qSu/y ZojApSos0ZjfPyG0PQl8F8e7AKRwFv57VZVLYJ1pHpA78Qju3sjjop40aOztOi1+6dzW fIJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hEBPP9Xi/ZZzIFEsEYpZ0vyaruST8+I2bnQ0HWzxFEk=; b=z4WtLiL7FxWcrO++XpbwU2iwL8IoBSN/EGflcosCf9w5mEG0SpUlzTm5ESrJhmhZdT /zWEfdmCxcpSAdh3NwPfA8+Id105hV8IwsU6rR3j8FQjtOzkRpiLt1wqc3KDgT27UAl7 EuviSyO9mN2tqU/VyafSRlLVMdZBEeILgWLVoYmXI0XhylCD+uPIYZDk9uJEy9MCe47m LyBBGjZ4t4ws6ca7RRxXvuhBXp8S2jMjZhUCpIFfkeqYlHbpg1E4h4DODhUwLstFSUlf x+QcDrgWl6T5miZo5OAUVnXxS0ppRrhy9OnwJPMJaKHlm2dgD3PCTEO0biaLq9gn4uTC sLBw== X-Gm-Message-State: AOAM531yKBTBQL97eXnrM0nKG87tizh3GWMgbV4ZXeWnIskmb+VTUEyg y47H5dIeDE9aAE/+w8eNavVn7MRNXOEzRg== X-Google-Smtp-Source: ABdhPJySy8FWpB711VdtQI2bk4czxtEGPzhmx5vfluvfHQFJuMzoCsT+Km5Qg7LGGvnsd3iUYSHR4A== X-Received: by 2002:a05:600c:5126:: with SMTP id o38mr14910wms.64.1631716119979; Wed, 15 Sep 2021 07:28:39 -0700 (PDT) Received: from localhost.localdomain (86-42-15-3-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.42.15.3]) by smtp.googlemail.com with UTF8SMTPSA id v8sm183997wrt.12.2021.09.15.07.28.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Sep 2021 07:28:39 -0700 (PDT) Subject: Re: bug#48894: ambiguous descriptions of logname and whoami To: Christoph Anton Mitterer , 48894-done@debbugs.gnu.org References: <02020362ea3fb067535a25eb288b03a0ee61a55f.camel@scientia.net> From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <53e08610-51ee-15b4-658d-9c040a9fc13b@draigBrady.com> Date: Wed, 15 Sep 2021 15:28:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0 MIME-Version: 1.0 In-Reply-To: <02020362ea3fb067535a25eb288b03a0ee61a55f.camel@scientia.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 48894-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 07/06/2021 02:49, Christoph Anton Mitterer wrote: > Hey. > > Man page of logname say: > "Print the name of the current user." > > IMO that's ambiguous as it's probably ought to be the name returned by > getlogin(). > > So when I login as normal user, and "su -" to root, logname won't print > "root" but the normal user. > However, what most people will understand under the "the current user" > would be root, in that case. > > > > Man AND info pages of whoami say: > "print effective userid" > > However, it's the user name, that is printed, not the userid (which > most people will understand as the numerical UID). Fixed with: https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=f76a56831 thanks! Pádraig From unknown Wed Sep 10 20:06:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 14 Oct 2021 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator