Request More Information

Email:  WhatsApp:

koenig-logo

Linux System Administration I Quiz Questions and Answers

Answer :
  • restart the ssh service on that machine
  • edit the /etc/ssh/ sshd_config con?guration ?le to allow or prohibit users logging in to the system as root. Add below and save and exit PermitRootLogin yes

Explanation :

The OpenSSH server uses the PermitRootLogin con?guration setting in the /etc/ssh/ sshd_config con?guration ?le to allow or prohibit users logging in to the system as root. PermitRootLogin yes With the PermitRootLogin parameter to yes, as it is by default,
Answer :
  • wc

Explanation :

wc - command helps to count the words, letters and byte counts for each file w - to see how many users logged in currently cat to display the file content ls - to list all the files in current working directory
Answer :
  • head /var/log/secure
  • head /var/log/messages

Explanation :

/var/log/messages Most syslog messages are logged here. Exceptions include messages related to authentication and email processing, scheduled job execution, and those which are purely debuggingrelated.
Answer :
  • /etc/resolv.conf

Explanation :

The `/etc/resolv.conf` file specifies the DNS servers that the system should query for domain name resolution. If this file is misconfigured, the system may fail to resolve hostnames into IP addresses.
Answer :
  • logger -p

Explanation :

To send a message to the rsyslog service that gets recorded in the /var/log/boot.log log ?le, execute the following logger command: [root@host ~]# logger -p local7.notice "Log entry created on host"
Answer :
  • usermod -aG groupname

Explanation :

The use of the -a option makes usermod function in append mode. Without -a, the user will be removed from any of their current supplementary groups that are not included in the -G option's list.
Answer :
  • useradd john --no-create-home

Explanation :

The 'useradd' command can be used with the '--no-create-home' option to add a user without creating a home directory. 'useradd' is a low-level command suitable for scripting and automation.