「最後の」コマンド出力で「不明な」ユーザーはどういう意味ですか?

「最後の」コマンド出力で「不明な」ユーザーはどういう意味ですか?

場合によっては、出力に次の奇妙な項目が表示されますlast

(unknown :0           :0               Tues Jul  4 06:51 - 06:51  (00:00)

Afaik、これは起こってはいけません。

なぜ、もっと具体的に何が起こるのだろうか。これには正当な理由があることを願っています(誰かがsshdを介して自分のコンピュータを悪用した場合を除いて)。

私はauth.logファイルで私が使用しなければならなかったユニークなキーワード「unknown」を検索し、時間範囲に一致するいくつかの奇妙なエントリを見つけました。

# grep --color=auto -A 10 -B 10 "unknown\|Unknown" auth.log.*

auth.log.1-Jul  4 06:51:41 magic gdm-launch-environment]: pam_unix(gdm-launch-environment:session): session opened for user Debian-gdm by (uid=0)
auth.log.1-Jul  4 06:51:41 magic systemd-logind[3291]: New session c1 of user Debian-gdm.
auth.log.1-Jul  4 06:51:41 magic systemd: pam_unix(systemd-user:session): session opened for user Debian-gdm by (uid=0)
auth.log.1-Jul  4 06:51:42 magic CRON[3329]: pam_unix(cron:session): session closed for user logcheck
auth.log.1-Jul  4 06:51:42 magic polkitd(authority=local): Registered Authentication Agent for unix-session:c1 (system bus name :1.21 [gnome-shell --mode=gdm], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
auth.log.1-Jul  4 06:51:52 magic gdm-password]: pam_unix(gdm-password:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=  user=user
auth.log.1:Jul  4 06:52:03 magic gdm-password]: pam_unix(gdm-password:session): session opened for user user by (unknown)(uid=0)
auth.log.1-Jul  4 06:52:03 magic systemd-logind[3291]: New session 3 of user user.
auth.log.1-Jul  4 06:52:03 magic systemd: pam_unix(systemd-user:session): session opened for user user by (uid=0)
auth.log.1-Jul  4 06:52:03 magic polkitd(authority=local): Unregistered Authentication Agent for unix-session:c1 (system bus name :1.21, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
auth.log.1-Jul  4 06:52:04 magic polkitd(authority=local): Registered Authentication Agent for unix-session:3 (system bus name :1.47 [/usr/bin/gnome-shell], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.utf8)
auth.log.1-Jul  4 06:55:58 magic gnome-keyring-daemon[5159]: couldn't allocate secure memory to keep passwords and or keys from being written to the disk

今、私はまだ時間をかけてPAMを学んでいないので、PAMがどのように機能するのかよく理解していないことを認めなければなりません。だから、このメッセージは私にとってやや不思議です。しかし、最後のアイテムであるこのアイテムは特に興味深いようです。

auth.log.1-Jul 4 06:55:58 magic gnome-keyring-daemon[5159]: **couldn't allocate secure memory to keep passwords and or keys from being written to the disk**

私は暗闇の中で努力していますが、私が見るには多分...(編集証的、無邪気で冷笑的に聞こえるかもしれません。これが私がここにいる理由です。)

  • 長年にわたって無害で偶然の失敗がたくさんありました。おそらくSSHを試してみると、メモリ不足のためにこれが起こりましたか?この特定のマシンには十分なRAMがあるため、これはあいまいな説明です。前回このようなことが起こったときに寝ていたと確信しているので、それが私だと信じていません...しかし、私が初めてこれを発見したのはおおよそ次のようになります。 3年前といくつかの他のコンピュータでは、私の記憶力が良くなく、正確に見つけるのが難しいです。

または

  • 私よりも多くのリソース、時間、IQ、および/またはお金を持つ誰かが私のパソコンで実行している唯一のリスニングサービスであるsshdを介して自分のコンピュータにアクセスしようとしています。 (通常、私のsshd設定はlocalhostのみを受け取り、torネットワークを介してのみアクセスできるため、これはより神秘的で信頼性が高くなります。いいえ一種のターゲット攻撃。この理論の問題は、私が知っている限り、この種の侵入を正当化する理由がないということです(法的に言えば、私は地球上で正直な生活を送ろうとする別の人間であるため)。

これらの奇妙なエラーを説明するための合理的な理由が何であるかを理解するのが困難です。 openssh-serverデーモンを実行しているいくつかの異なるLinux(Debianベース)システムでこの現象を発見しました。これが役に立つ場合、私のsshd設定は通常次のようになります。

Port 222
ListenAddress 127.127.127.127:222
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
# Insecure ancient DSA
#HostKey /etc/ssh/ssh_host_dsa_key
# Not certain whether we ought to trust elliptic curve or NIST
#HostKey /etc/ssh/ssh_host_ecdsa_key
UsePrivilegeSeparation yes
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 4096
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 90
PermitRootLogin no
StrictModes yes
# Never use this deprecated crap
RSAAuthentication no
PubkeyAuthentication yes
# lock down to this group
AllowGroups ssh-users
AuthorizedKeysFile  %h/.ssh/authorized_keys
IgnoreRhosts yes
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no
ChallengeResponseAuthentication no
PasswordAuthentication no
X11Forwarding no
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
# extra logging info for sftp
Subsystem sftp /usr/lib/openssh/sftp-server -f auth -l info
UsePAM yes
# hardened ciphering
MACs [email protected],[email protected],[email protected],[email protected],hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,[email protected]
KexAlgorithms [email protected],diffie-hellman-group-exchange-sha256
Ciphers [email protected],[email protected],[email protected],aes256-ctr,aes192-ctr,aes128-ctr

どんな洞察力や助けにも大変感謝します。ありがとうございます。

ベストアンサー1

おすすめ記事