While working on VPS , W and Who command not working but all other commands working properly.
Fix :To solve this problem edit
/etc/ssh/sshd_config file and add
"UsePAM no" and
"UseLogin yes" in that file. Now the modified part of the configuration file should look like as:
UsePAM no
#UsePAM yes
UseLogin yes
Now restart SSHD service and execute the w and who command.