~alpine/users

6 4

[alpine-user] How to check current and previously logged in users in Alpine 3.8.2?

Details
Message ID
<CANf9dFMbfNjefsyQuzeiTCe1na2JSg9LGsX53oEb1u3J2Vyiyg@mail.gmail.com>
Sender timestamp
1547131459
DKIM signature
missing
Download raw message
What is the proper way to check current and previously logged in users in
Alpine 3.8.2?

The "who" command does not appear to have been compiled in Alpine's Busybox
(although it _can_ be according to the man page). Installing coreutils does
give me the "who" command, but it returns nothing, even though I am logged
in on the console when executing it.

Also, executing the "last" command gives this error:

  couldn't open file '/dev/null/wtmp': Not a directory

Regards,
-Martin
Details
Message ID
<CANf9dFP35O0eA7FPbFKdMjYEOV4eSM1zxRBBwUObf_9bcWQzAw@mail.gmail.com>
In-Reply-To
<CALci+FRrvcPknrU4LZBVWdiuvaAbOVB=UvD9NqUL+Ro8Rx_Z_Q@mail.gmail.com> (view parent)
Sender timestamp
1547133477
DKIM signature
missing
Download raw message
Thanks for that. I'm a new Alpine Linux user and it completely escaped me
to check if it was a bug.

I'll do better next time.
-Martin

On Thu, Jan 10, 2019, 09:50 PICCORO McKAY Lenz <mckaygerhard@gmail.com
wrote:

> https://bugs.alpinelinux.org/issues/3282
>
>
> El jue., 10 de ene. de 2019 a la(s) 10:45, Martin Gignac (
> martin.gignac@gmail.com) escribió:
>
>> What is the proper way to check current and previously logged in users in
>> Alpine 3.8.2?
>>
>> The "who" command does not appear to have been compiled in Alpine's
>> Busybox (although it _can_ be according to the man page). Installing
>> coreutils does give me the "who" command, but it returns nothing, even
>> though I am logged in on the console when executing it.
>>
>> Also, executing the "last" command gives this error:
>>
>>   couldn't open file '/dev/null/wtmp': Not a directory
>>
>> Regards,
>> -Martin
>>
>
PICCORO McKAY Lenz <mckaygerhard@gmail.com>
Details
Message ID
<CALci+FRrvcPknrU4LZBVWdiuvaAbOVB=UvD9NqUL+Ro8Rx_Z_Q@mail.gmail.com>
In-Reply-To
<CANf9dFMbfNjefsyQuzeiTCe1na2JSg9LGsX53oEb1u3J2Vyiyg@mail.gmail.com> (view parent)
Sender timestamp
1547131791
DKIM signature
missing
Download raw message
https://bugs.alpinelinux.org/issues/3282


El jue., 10 de ene. de 2019 a la(s) 10:45, Martin Gignac (
martin.gignac@gmail.com) escribió:

> What is the proper way to check current and previously logged in users in
> Alpine 3.8.2?
>
> The "who" command does not appear to have been compiled in Alpine's
> Busybox (although it _can_ be according to the man page). Installing
> coreutils does give me the "who" command, but it returns nothing, even
> though I am logged in on the console when executing it.
>
> Also, executing the "last" command gives this error:
>
>   couldn't open file '/dev/null/wtmp': Not a directory
>
> Regards,
> -Martin
>
PICCORO McKAY Lenz <mckaygerhard@gmail.com>
Details
Message ID
<CALci+FTHjJDGrHNKpeqrQfTFKeZbJaZpx1=OE25yYDEJ=JgdvQ@mail.gmail.com>
In-Reply-To
<CANf9dFP35O0eA7FPbFKdMjYEOV4eSM1zxRBBwUObf_9bcWQzAw@mail.gmail.com> (view parent)
Sender timestamp
1547133600
DKIM signature
missing
Download raw message
umm, but some one in the list have a workaround? its a big fault!

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com


El jue., 10 de ene. de 2019 a la(s) 11:18, Martin Gignac (
martin.gignac@gmail.com) escribió:

> Thanks for that. I'm a new Alpine Linux user and it completely escaped me
> to check if it was a bug.
>
> I'll do better next time.
> -Martin
>
> On Thu, Jan 10, 2019, 09:50 PICCORO McKAY Lenz <mckaygerhard@gmail.com
> wrote:
>
>> https://bugs.alpinelinux.org/issues/3282
>>
>>
>> El jue., 10 de ene. de 2019 a la(s) 10:45, Martin Gignac (
>> martin.gignac@gmail.com) escribió:
>>
>>> What is the proper way to check current and previously logged in users
>>> in Alpine 3.8.2?
>>>
>>> The "who" command does not appear to have been compiled in Alpine's
>>> Busybox (although it _can_ be according to the man page). Installing
>>> coreutils does give me the "who" command, but it returns nothing, even
>>> though I am logged in on the console when executing it.
>>>
>>> Also, executing the "last" command gives this error:
>>>
>>>   couldn't open file '/dev/null/wtmp': Not a directory
>>>
>>> Regards,
>>> -Martin
>>>
>>
PICCORO McKAY Lenz <mckaygerhard@gmail.com>
Details
Message ID
<CALci+FS4gHoD4iTyu7P8OvAnYQGdNFMcqBXiDJnVHc1z-rgKXA@mail.gmail.com>
In-Reply-To
<em0fa5f475-ad0c-4fa6-a94d-434f9f34f0a8@elzian> (view parent)
Sender timestamp
1547149054
DKIM signature
missing
Download raw message
El jue., 10 de ene. de 2019 a la(s) 15:18, Laurent Bercot (
ska-devel@skarnet.org) escribió:

> >I think Joey Smith's suggestion for using utmps is worth investigating.
> >https://skarnet.org/software/utmps/index.html
> >https://skarnet.org/software/utmps/overview.html
> >The examples in the git repo show that it can be used with OpenRC
> although it still needs the s6-ipcserver.
> There has been a utmps package in the Alpine distribution since
> August 2018.
>
seems are thefirts step only

>
>   ... at least, that's when the patch was sent to the alpine-aports
> mailing-list. I don't know if it has been processed since, because
> Alpine maintainers seem to privilege GitHub PRs and hardly ever seem
> to find the time and/or energy to process ML patches.
>
ummm "quite xtrange"


>   In any case, the package is a little old and I've been late in
> maintaining my packages lately, sorry about that. New versions should
> arrive towards the end of this month. If they don't get lost in
> patchwork limbo.
>
thanks for your work

>
> --
>   Laurent
>
>
>
> ---
> Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
> Help:         alpine-user+help@lists.alpinelinux.org
> ---
>
>
Details
Message ID
<9386d1ea-8ecd-fe3e-208e-b3b3bb8995fb@vincentbentley.co.uk>
In-Reply-To
<CALci+FRrvcPknrU4LZBVWdiuvaAbOVB=UvD9NqUL+Ro8Rx_Z_Q@mail.gmail.com> (view parent)
Sender timestamp
1547139969
DKIM signature
missing
Download raw message
I think Joey Smith's suggestion for using utmps is worth investigating.

https://skarnet.org/software/utmps/index.html
https://skarnet.org/software/utmps/overview.html

The examples in the git repo show that it can be used with OpenRC 
although it still needs the s6-ipcserver.

For utmpd...

#!/sbin/openrc-run

name="utmpd"
command="s6-ipcserver"
command_args="/run/utmps/utmpd-socket utmps-utmpd"
command_background=yes
command_user=utmp
pidfile="/run/utmps/utmpd.pid"
start_stop_daemon_args="-d /run/utmps"

start_pre() {
    checkpath -D -d -o utmp:utmp -m 0755 /run/utmps
}

For wtmpd...

#!/sbin/openrc-run

name="wtmpd"
command="s6-ipcserver"
command_args="/run/utmps/wtmpd-socket utmps-wtmpd"
command_background=yes
command_user=utmp
pidfile="/run/utmps/wtmpd.pid"
start_stop_daemon_args="-d /run/utmps"

start_pre() {
    checkpath -D -d -o utmp:utmp -m 0755 /run/utmps
}


On 10/01/2019 14:49, PICCORO McKAY Lenz wrote:
> https://bugs.alpinelinux.org/issues/3282
> 
> 
> El jue., 10 de ene. de 2019 a la(s) 10:45, Martin Gignac 
> (martin.gignac@gmail.com <martin.gignac@gmail.com>) escribió:
> 
>     What is the proper way to check current and previously logged in
>     users in Alpine 3.8.2?
> 
>     The "who" command does not appear to have been compiled in Alpine's
>     Busybox (although it _can_ be according to the man page). Installing
>     coreutils does give me the "who" command, but it returns nothing,
>     even though I am logged in on the console when executing it.
> 
>     Also, executing the "last" command gives this error:
> 
>        couldn't open file '/dev/null/wtmp': Not a directory
> 
>     Regards,
>     -Martin
> 


---
Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---
Laurent Bercot <ska-devel@skarnet.org>
Details
Message ID
<em0fa5f475-ad0c-4fa6-a94d-434f9f34f0a8@elzian>
In-Reply-To
<9386d1ea-8ecd-fe3e-208e-b3b3bb8995fb@vincentbentley.co.uk> (view parent)
Sender timestamp
1547147733
DKIM signature
missing
Download raw message
>I think Joey Smith's suggestion for using utmps is worth investigating.
>
>https://skarnet.org/software/utmps/index.html
>https://skarnet.org/software/utmps/overview.html
>
>The examples in the git repo show that it can be used with OpenRC although it still needs the s6-ipcserver.

  There has been a utmps package in the Alpine distribution since
August 2018.

  ... at least, that's when the patch was sent to the alpine-aports
mailing-list. I don't know if it has been processed since, because
Alpine maintainers seem to privilege GitHub PRs and hardly ever seem
to find the time and/or energy to process ML patches.

  In any case, the package is a little old and I've been late in
maintaining my packages lately, sorry about that. New versions should
arrive towards the end of this month. If they don't get lost in
patchwork limbo.

--
  Laurent



---
Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)