MyAdmin Advanced

Friday, February 29th, 2008

My last article on working as non-admin works great in home environment. But it won’t allow access to any network resources (file share, printer, etc) in corporate environment. This happens because local administrator user are not part of Windows domain and so treated as anonymous user.

Following new version of “MyAdmin” AHK (AutoHotkey) script overcomes the problem mentioned above.

; Some default values
LocalAdminGroup = Administrators
; Settings for local administrator
LocalAdminUser = admin
LocalAdminPass = secret
; Settings for normal user
WindowsDomain = domain
NormalUser = user
NormalPass = password
RunTarget = C:\Program Files\ExplorerXP\ExplorerXP.exe

IfExist, %RunTarget%
{
; Add normal user to local admin group
RunAs, %LocalAdminUser%, %LocalAdminPass%
RunWait, NET LOCALGROUP %LocalAdminGroup% %WindowsDomain%\%NormalUser% /ADD, , Hide
RunAs ; Reset to normal behavior.
; Execute target with elevated administrator permissions
RunAs, %NormalUser%, %NormalPass%, %WindowsDomain%
Run, %RunTarget%
; Wait for 200 ms
Sleep, 200
; remove itself from local admin group
RunWait, NET LOCALGROUP %LocalAdminGroup% %WindowsDomain%\%NormalUser% /DELETE, , Hide
RunAs ; Reset to normal behavior.
}
IfNotExist, %RunTarget%
{
MsgBox, Target (i.e. %RunTarget%) does not exist.
}

Please be informed to follow Aaron’s advise on Default Owner fix.

Cheers,

MyAdmin Script

Wednesday, February 27th, 2008

Are you are using non-admin account to work and browse on your machine?

If yes, following AHK (AutoHotkey) script can be very handy

; Settings for local administrator
AdminUser = admin
AdminPass = secret
RunTarget = C:\Program Files\ExplorerXP\ExplorerXP.exe
IfExist, %RunTarget%
{
RunAs, %AdminUser%, %AdminPass%
Run, %RunTarget%
RunAs ; Reset to normal behavior.
}
IfNotExist, %RunTarget%
{
MsgBox, Target (i.e. %RunTarget%) does not exist.
}

ExplorerXP is a very fast, small and compact FREEWARE which works great with RunAs. ExplorerXP can be used to perform any privileged tasks (add/remove programs, registry edit, etc) as admin user.

Windows Explorer does not start multiple instance without registry hack and complexity.

Cheers,

Gmail IMAP with SquirrelMail

Tuesday, February 26th, 2008

Friends,

I am listing steps required for setting up SquirrelMail to work with Gmail IMAP. This is especially useful when you like SquirrelMail or don’t have access to regular http://mail.google.com :-) You can even use it to brand your custom domain hosted at Google Apps and seamlessly integrate it your portal (if you can afford, consider buying Google’s Premium Edition which comes with API access at $50/user/year).

Steps:

Create a place holder for SquirrelMail and unpack the latest distribution

mkdir -p /home/squirrel/data/attachments
cd /home/squirrel/
chown -R apache.apache data
tar zxvf ~/downloads/squirrelmail-1.4.13.tar.gz

Configure the installation (do nothing simply save and quit).

cd squirrelmail-1.4.13
./configure

Append following lines into /home/squirrel/squirrelmail-1.4.13/config/config_local.php

$domain = ‘gmail.com’;
// IMAP settings
$imapServerAddress = ‘imap.gmail.com’;
$imapPort = 993;
$use_imap_tls = true;
$imap_auth_mech = ‘login’;
// SMTP settings
$smtpServerAddress = ’smtp.gmail.com’;
$smtpPort = 465;
$use_smtp_tls = true;
$smtp_auth_mech = ‘login’;
// Special folder setting
$trash_folder = ‘[Gmail]/Trash’;
$sent_folder = ‘[Gmail]/Sent Mail’;
$draft_folder = ‘[Gmail]/Drafts’;
// Attachment
$data_dir = ‘/home/squirrel/data/’;
$attachment_dir = ‘/home/squirrel/data/attachments/’;
// Optional -
$provider_name = ‘Gmail alternative by Sudhaker’;
$provider_uri = ‘http://sudhaker.com/’;

Create an alias in apache /etc/httpd/conf.d/squirrel.conf

Alias /sq “/home/squirrel/squirrelmail-1.4.13″
<Directory “/home/squirrel/squirrelmail-1.4.13″>
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>

Verify the setup by browsing to ${site_url}/sq/

User Id: example@gmail.com (or user@example.com)
Password: email_password

Please make appropriate changes for cPanel based hosting (shared hosting).

Please follow following step if SELinux is enabled.

[root@centos ~]# setsebool httpd_can_network_connect true

Please drop a comment if you find it useful.

Cheers,
Sudhaker

Emporis Buildings

Monday, February 25th, 2008

Emporis.com is one of the world’s largest available platforms concerning building-related information. Here you find buildings, companies and photos in more than 50,000 cities worldwide.

You can find everything about any commercial building. This lookup site is extremely useful in finding some company

My workplaces: 575 Washington Blvd, Newport, PaineWebber Building, Western Electric Building, One World Financial Center, 50 Main Street, White Plains, 379 Thornall Street, Edison, Nine West Office Center

I sometime browse them during my nostalgic hours.

Cheers,