W and Who command is not working

W and Who command is not working

What is “w” command?

“w” displays information about the users currently on the machine, and their processes. The header shows, in this order, the current time,how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes and their processes.

What is “who” command?

“Who” Print information about users who are currently logged in.

Above both commands are important command and used on daily basis by all system administrators, but some time while running “w” or “who” command not working because changes made by system administrator in a /etc/ssh/sshd_config file.

To make “w” and “who” command workable once again, we need to make following changes in /etc/ssh/sshd_config file.

From

UsePAM yes
UseLogin no

To

UsePAM no
UseLogin yes

Note : Before making any changes in important configuration file, its always recommended to take a backup to avoid any problem in future because of any mistake or wrong entries in a configuration file.

About Anant 373 Articles
Senior technical writer