Archive for the 'howto' Category

psexec to install msi on remote pc

psexec \\remotepc -u Domain\User -p Password msiexec /i "pathto.msi switches"

Grayed out/Missing HTTP Filter context menu in ISA 2006

This one had been bothering me for quite some time now. Ever since upgrading from ISA 2004 to ISA 2006, I noticed that the context menu item for editing the per rule HTTP Filter settings was missing from all the web publishing/access rules.

Grayed out filtering

The only way I could edit these settings was the HTTPFilterConfig.vbs script which is included in the ISA SDK. This script lets you import the filter settings to a rule from an XML file or export them to an XML file from a rule for which the filter settings have already been modified. This works quite well but is a hassle every time a rule needs to be modified.

It turns out that the Web Proxy Filter must be enabled for the HTTP protocol. Without this enabled, you loose the HTTP filter configuration menu. If you dont want to enable the Web Proxy filter, as it may not work well with some sites, enable it temporarily, change the HTTP filter setting and then disable it. The HTTP filter settings will still remain active. Problem solved.
HTTP ProtocolEnable Web Proxy Filter

Restrict SSH login access on CentOS

By default CentOS allows ssh access to all users who can authenticate with the server. This can be a security risk especially when you have setup the server to authenticate against an Active Directory domain. In this case all the users on the domain can login via ssh to your CentOS server. You can, however, very easily restrict logins to specific users, computers, or even users on specific computers.

To do this, edit /etc/ssh/sshd_config by adding the AllowUsers directive in the following format.

AllowUsers user@host

This allows the user ‘user’ to login at the host named ‘host’. Multiple users can listed by separating each with a space. You can also use * to specify wildcards. You can also specify IP addresses and ranges using *.

AllowUsers *@192.168.1.* johndoe@192.168.1.3

This will allow all users to log into all computers with address starting with 192.168.1 and the user johndoe to log only into the with IP address 192.168.1.3.

This will work for other Linux OSes as well.

Changing Windows timezone from the command line

To change the timezone from the command line in Windows, type the following at the prompt and press enter. This will open up the timezone setting window from the Control Panel.

RunDLL32 shell32.dll,Control_RunDLL %SystemRoot%\system32\TIMEDATE.cpl,,/Z US Eastern Standard Timep

In a limited access account, (all members of the USER group) you can run this command using Runas.

runas /u:%computername%\administrator cmd

followed by

RunDLL32 shell32.dll,Control_RunDLL %SystemRoot%\system32\TIMEDATE.cpl,,/Z US Eastern Standard Timep

This method works in both XP and Vista.

[src]

Listing used ports in Linux

The lsof command can display all open files in Linux. With some filtering you can use it to show all open/utilized ports as well.

lsof -i TCP:443
This command will list all processes, their pids, and user under which the process is running, that are utilizing port 443.

To list all TCP ports, one could use
lsof -i TCP

Type lsof –help for more options.