Skip to content

Recent Logins section and empty strings #505

@mdabrowskin

Description

@mdabrowskin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions