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
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>>>
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>
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>>>>>
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> --->>
I think Joey Smith's suggestion for using utmps is worth investigating.
https://skarnet.org/software/utmps/index.htmlhttps://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
---
>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
---