Centos: List SSH user last password changed date with cPanel

To secure your server with cPanel, you might want to consider to request your cPanel user to change your password quarterly.

To get this done, you may consider to use the command name chage.

[email protected] [~]# chage -l username
Last password change                                    : Jul 28, 2012
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 0
Maximum number of days between password change          : 99999
Number of days of warning before password expires       : 7

To list all user Last password change date, you may do with the following command,

for i in `ls -l /var/cpanel/users | grep -vE '(\.|system)'| awk '{print $9}'`;do echo $i&&chage -l $i|grep Last;done;

The terminal server has exceeded the maximum number of allowed connections

For those who are using Windows Server Remote Desktop Connection, you might found this error during your operation.

Error: The terminal server has exceeded the maximum number of allowed connections

As Windows Server 2003 is using Terminal Services to control the Remote Desktop Connection, your maximum connection is 2 only. However, you got the third connection allowed as admin mode.

mstsc /v:x.x.x.x /admin

If you are using Windows Server 2008, use the admin console mode instead.

mstsc /v:x.x.x.x /console

Reboot Server within a network in Windows Platform

Do you ever try to reboot or shut down a server/PC within a network?

The mystery from Microsoft have done if you are running with administrator role, just try to the command as below if you could like to reboot/shutdown.

1. Open command prompt by Press Windows+R and type in cmd.
2. Type in “shutdown /m \\computername /r” if you could like to reboot.

The General format was as below:

shutdown \\computername /l /a /r /t:xxmsg” /y /c

  • \\computername: Use this switch to specify the remote computer to shut down. If you omit this parameter, the local computer name is used.
  • /l (Note that this is a lowercase “L” character): Use this switch to shut down the local computer
  • /a: Use this switch to quit a shutdown operation. You can do this only during the time-out period. If you use this switch, all other parameters are ignored.
  • /r: Use this switch to restart the computer instead of fully shutting it down.
  • /t:xx: Use this switch to specify the time (in seconds) after which the computer is shut down. The default is 20 seconds.
  • msg: Use this switch to specify a message during the shutdown process. The maximum number of characters that the message can contain is 127.
  • /y: Use this switch to force a “yes” answer to all queries from the computer.
  • /c: Use this switch quit all running programs. If you use this switch, Windows forces all programs that are running to quit. The option to save any data that may have changed is ignored. This can result in data loss in any programs for which data is not previously saved.

Within the above description you may force all of the query and etc from the command to reboot/shutdown a server/PC.

Have fun.

Article from: http://support.microsoft.com/kb/317371