Wednesday, May 12, 2010

How to Configure ssh for root user in VMWare ESX

Logon directly to ESX Host and edit the configuration file for ssh

  1. Enter in the prompt nano /etc/ssh/sshd_config
  2. Find the line PermitRootLogin and change the value of PermitRootLogin no to yes
  3. Press Ctrl o
  4. Press Enter
  5. Press Ctlr x
Finally, you need to restart the ssh service by entering the following command:
  1. service sshd restart
  2. Press Enter
Once you completed the above steps, simple use putty to test that changes you made is working fine by allowing you to logon via service console with the root privileges.

     
 

Tuesday, May 11, 2010

Permissions to Manage Mailbox Servers

So here is the command that you use to add mailbox permissions:


Add-MailboxPermission -Identity "Some User" -User fawad -Accessright Fullaccess -InheritanceType all

Here are some more parameters for -Accessright, which is actually the most important part of the command that can be used to control the permission:

FullAccess
DeleteItem
ReadPermission
ChangePermission
ChangeOwner
ExternalAccount
SendAs

MS Reference article: Answer Available Here


 

Thursday, May 6, 2010

How to Unblock Attachments in Microsoft Outlook

In order to unblock attachments in MS outlook, you need to follow few simple registry modification. But it is recommended to backup your registry before you start editing it.


Go command prompt (cmd) then regedit (press enter) and then go to:

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Security

1. Backup your registry by right clicking and select Export.

2. Add a new String Value called: Level1Remove

Once you added the string value then you need to edit it and save the value data to the extension you wish to allow but makesure you add a semi colon delimiter after each extensions.

For Example: .mdb or .mdb;.exe;.scr;.bat and so on

3. Finally, you need to restart outlook without rebooting you pc.

Please refer to MS KB for further details

Tuesday, April 27, 2010

Windows Server 2008 RDP and Widows Firewall

This can be an issue when you have some sort of GP in your domain to stop the Windows firewall services. If the windows firewall service is stopped for Windows Server 2008, then the traffic to the server will be blocked. This means when the clients try to establish an RDP session will have issue connecting to the server.


Use the following commands to enable or disable the Windows firewall:

Netsh advfirewall set allprofiles state on or Netsh advfirewall set allprofiles state off

Useful AIX commands

Answere Available Here

AIX FAQ

I found the below wesite very useful:
Click Here

How to check the AIX version

Putty to AIX server and use the following below command:

Use "oslevel -g"

Friday, April 23, 2010

How to clean up the metadata of deleted domain controllers

With Windows Server 2008, when you delete a DC from the Active Directory Sites and Services MMC snap-in, and all the DC's associated metadata is also deleted. However, on earlier versions of Windows Server the metadata is left around if a DC is improperly demoted.

Please refer to MS KB: How to remove data in Active Directory after an unsuccessful domain controller demotion 

Microsoft also provides a script (Remove Active Directory Domain Controller Metadata Script) with a GUI to delete DCs. The script currently support the following platforms: Windows Server 2008/R2, Windows Server 2003, Windows XP and Windows 2000.

Revive Deleted AD Objects with Active Directory Recycle Bin

Answer Available Here

Friday, April 9, 2010

How to reboot/shutdown Windows Servers remotely using PsShutdown utility

You need to copy the PsShutdown file on Windows server in a folder. Say I saved the file under a folder called C:\downloadss. Next open windows command prompt, go to  (Start > Run > cmd) and schedule the  reboot:


c:> at 12:00am c:\downloads\psshutdown.exe -r -f -c -t 10 -accepteula

Above command will reboot the system at 12am. If you want to shutdown system:

c:> at 12:00am c:\downloads\psshutdown.exe -s -f -c -t 10 -accepteula

Where:
  • -s: Shutdown specified server
  • -r: Reboot specified server
  • -f: Forces all running application to exit
  • -c: Allow the shutdown to by cancel by user
  • -t: Specifies the countdown in seconds until the reboot or shutdow process
  • -accepteula (you need to add -accepteula to the psshutdown command, otherwise the task will hang, indicating a “running” state in Scheduled Tasks)

Tuesday, March 16, 2010

How find out a User Login Name

You can use this window server 2003 native command to find out users login details:

DSQUERY USER -name *LastNameOrFirstNameQuestionedUser* | DSGET USER -samid -display

For Example, if we want to find out fawad's login details then the command would be:

DSQUERY USER -name *fawad* | DSGET USER -samid -display

Output Screen from above command:

samid       display

FZI          Fawad Zikria
dsget succeeded

Who is Logged on to a Computer

You can use WMIC command on Window xp pro or later version of OS to find out who is logged on to a computer.

WMIC /Node:RemoteComputerName ComputerSystem Get UserName

For Example:

>WMIC /Node:replicator ComputerSystem Get UserName
UserName
fzk
ske
tet
tue

Above are 4 users who are currently logged on to replicator.

Also, you can use the PSTools to find out who is logged on to a computer remotely by executing the following command:

PSLOGGEDON -L \\Remote ComputerName or PSEXEC file://remotecomputername/ NET NAME

How to List all Domain Controllers on your Domain

Open the CLI and type to following Window Server 2003 native commands:

DSQUERY Server

Otput Screen:

"CN=testserver,CN=Servers,CN=sydney,CN=Sites,CN=Configuration,DC=test,DC=com,DC=au"

"CN=DC1,CN=Servers,CN=Campbelltown,CN=Sites,CN=Configuration,DC=test,DC=com,DC=au"
"CN=DC2,CN=Servers,CN=Campbelltown,CN=Sites,CN=Configuration,DC=test,DC=com,DC=au"
"CN=SDC1,CN=Servers,CN=City,CN=Sites,CN=Configuration,DC=test,DC=com,DC=au"
"CN=SDC2,CN=Servers,CN=City,CN=Sites,CN=Configuration,DC=test,DC=com,DC=au"

or, if you prefer the host names only then type:

DSQUERY Server -o rdn

Output Screen:
testserver

DC1
DC2
SDC1
SDC2

You can also use the below command on window server 2003:

           nltest /dclist:DomainName

For example:

       nltest /dclist:test.com.au


Useful Commands for Windows Administrator

Answer Available Here