tariqbuilds / linux-dash

A beautiful web dashboard for Linux

Home Page:https://afaqurk.github.io/linux-dash/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recent Logins section and empty strings

chrobryknur opened this issue · comments

Hi!
I've just found that that the recent_account_logins() function in linux_json_api.sh script doesn't provide any check whether the "From" column of lastlog output is a non-empty string. It results in a weird formatting of the Recent Logins section on the Dash:
image

The awk script in the recent_account_logins() that the lastlog's output is piped to, just prints a hardcoded set of columns, which just "shifts" some of them to the left if one is an empty string, making the first part of the date appear in the IP column.

My lastlog's output:

Username       Port     From                Latest
root             tty5                      Thu Apr  8 22:58:30 +0200 2021
daemon                                     **Never logged in**
...
sddm                                       **Never logged in**
marcin           pts/3    192.168.1.14     Thu Apr  8 23:01:25 +0200 2021
systemd-coredump                           **Never logged in**
...
Debian-gdm                                 **Never logged in**

I am willing to fix this issue, when I find some time. Just wanted to inform you about the issue.