You work for a large firm that uses a server to host a publicly facing webserver and SFTP server. This server runs Ubuntu Server 22.04.1 LTS. A system administrator who has access to this server was recently a victim of a phishing attack and it was found that the individual reuses the same password for all of the different authentication mechanisms and applications at work. You want to verify that their Ubuntu user with a UID of 1234 has not been used on any publicly facing servers such as the webserver and SFTP server. Which command would help achieve this?
history | grep -e [Uu]id | grep 1234
Correct Incorrect Unanswered Report Issue Answer Description
Ubuntu is a Linux distribution that uses systemd and has a command line tool journalctl
to review and query system logs. Using the _UID=$UID
option you can filter to certain users using the User ID (UID). History is a similar tool in Linux to show a users history of commands, however it does not track everything, can be cleared and deleted easily and finally only tracks a limited number of past commands (it is intended for convenience not security reviews). Finally net user
is a Windows command and not Linux.
Wikipedia
systemd is a software suite that provides an array of system components for Linux operating systems. The main aim is to unify service configuration and behavior across Linux distributions. Its primary component is a "system and service manager" – an init system used to bootstrap user space and manage user processes. It also provides replacements for various daemons and utilities, including device management, login management, network connection management, and event logging. The name systemd adheres to the Unix convention of naming daemons by appending the letter d. It also plays on the term "System D", which refers to a person's ability to adapt quickly and improvise to solve problems.Since 2015, the majority of Linux distributions have adopted systemd, having replaced other init systems such as SysV init. It has been praised by developers and users of distributions that adopted it for providing a stable, fast out-of-the-box solution for issues that had existed in the Linux space for years. At the time of adoption of systemd on most Linux distributions, it was the only software suite that offered reliable parallelism during boot as well as centralized management of processes, daemons, services and mount points.
Critics of systemd contend that it suffers from mission creep and bloat; the latter affecting other software (such as the GNOME desktop), adding dependencies on systemd, reducing its compatibility with other Unix-like operating systems and making it difficult for sysadmins to integrate alternative solutions. Concerns have also been raised about Red Hat and its parent company IBM
Systemd - Wikipedia, the free encyclopedia Subscribe to avoid duplicate questions and track your progress over time