From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00, DNS_FROM_AHBL_RHSBL, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Message-ID: <55074A7A.5020503@complife.ru> Date: Mon, 16 Mar 2015 22:26:18 +0100 From: "Michael A. Kangin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: ALT Linux Community general discussions References: <55070FFD.1010908@complife.ru> <20150316203115.GA6980@altlinux.org> In-Reply-To: <20150316203115.GA6980@altlinux.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Comm] passwd after su - X-BeenThere: community@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Community general discussions List-Id: ALT Linux Community general discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Mar 2015 21:26:15 -0000 Archived-At: List-Archive: List-Post: 16.03.2015 21:31, Dmitry V. Levin пишет: >> [root@mak-ws ~]# passwd >> passwd: updating all authentication tokens for user mak. > > Традиционно passwd по умолчанию меняет пароль того же самого пользователя, > которого показывает logname(1). В вашем случае: > > [root@mak-ws ~]# logname > mak Ok, похоже на то. Но, возвращаясь к, правильно ли такое поведение? DESCRIPTION Print the name of the current user. А по всем id - current user это root. `logname' prints the calling user's name, as found in a system-maintained file (often `/var/run/utmp'), [root@mak-ws ~]# last -f /var/run/utmp root pts/1 localhost Mon Mar 16 22:18 still logged in root pts/0 192.168.5.127 Mon Mar 16 19:35 still logged in reboot system boot 3.14.35-std-def- Mon Mar 16 19:35 - 22:24 (02:49)