UnixServerAdmin

Server Administration & Management

Show hidden folders are not shown even after check the options has hide folders

Do change in registry

1. HKEY_Local Machine –> Software –> Microsoft –> Windows –> Current Version –> Explorer –> advance –> folder –> Hidden –> showall

change checked value to 1

2. HKEY_current User –> Software –> Microsoft –> Windows –> Current Version –> Explorer –> advance 

change hidden to 1

Advertisements

July 11, 2011 Posted by | Windows | | Leave a comment

Permission to Add a Workstation/Server on Domain

By default authenticated user can add 10 Pc on network, to remove this setting may be change in

Start  –> program –> administrative tools –> domain security policy –> security settings –> local policies –> use right assignment –> add workstation to diomain.

Start –> program –> administrative tools –> domain controller –> security policy –> security setting –> local policies –> user right assignment –> add workstaion to domain

July 10, 2011 Posted by | Windows | | Leave a comment

How to hide PC/workstation from workgroup list

Start Registry Editor, and then click the following registry key:

HKEY_CURRENT_Local Machine –> System –> currentControlSet –> Services –> LanMan Server –> parameters

Click on hidden and modify value from 0 to 1

or

type following command

net config server /hidden:yes

July 9, 2011 Posted by | Windows | , | Leave a comment

How to removing Entries in the Windows Remote Desktop Connection Client

To remove entries from the Remote Desktop Connection Computer box in the Windows Remote Desktop Connection client, start Registry Editor, and then click the following registry key:

HKEY_CURRENT_USER –> Software –> Microsoft –> Terminal Server Client –> Default

Entries appear as MRUnumber, and are visible in the right pane. To delete an entry, right-click it, and then click Delete.

Removing Entries in the Mac Remote Desktop Connection Client,  To remove entries from the Remote Desktop Connection Computer box in the Mac Remote Desktop Connection client, delete the Users:Username:Library:Preferences:Microsoft:RDC Client:Recent Servers file.

Note :- The list of all destination connections (including previous connections) are stored in an MRUnumber value in the following registry key:

HKEY_CURRENT_USER –> Software –> Microsoft –> Terminal Server Client –> Default

Every new connection is given the value of MRU0, and the other values are then sequentially moved down in number. The MRU value can contain a Fully Qualified Domain Name or an IP address of the computer to which you connect.

For example:
MRU0 REG_SZ 192.168.16.60
MRU1 REG_SZ computer.domain.com

July 8, 2011 Posted by | Windows | , | 1 Comment

SVCHOST.EXE Application Error

Verify Windows Update Service Settings

Click on Start, Run and type the following command in the open box and click OK

services.msc

Find the Automatic Updates

Service and double-click on it.

–> Click on the Log On Tab and make sure the “Local System Account” is selected as the logon account and the box for “allow service to interact with desktop” is UNCHECKED. Under the Hardware Profile section in the Log On Tab, make sure the service is enabled.

–> On the General Tab, the Startup Type should be Automatic, if not, drop the box down and select Automatic. Under “Service Status” on the General tab, the service should be Started, click the Start button enable it. Repeat the steps above for the service “Background Intelligent Transfer Service (BITS)”

Re-Register Windows Update DLLs

–> Click on Start, Run, and type CMD and click ok

–> In the black command window type the following command and press Enter

1. REGSVR32 WUAPI.DLL

Wait until you receive the “DllRegisterServer in WUAPI.DLL succeeded” message and click OK
Repeat the last two steps above for each of the following commands:

2. REGSVR32 WUAUENG.DLL
3. REGSVR32 WUAUENG1.DLL
4. REGSVR32 ATL.DLL
5. REGSVR32 WUCLTUI.DLL
6. REGSVR32 WUPS.DLL
7. REGSVR32 WUPS2.DLL
8. REGSVR32 WUWEB.DLL

Remove Corrupted Windows Update Files

At the command prompt, type the following command and press Enter

net stop WuAuServ  Still at the command prompt,

type cd %windir% and press Enter
In the opened folder, type the following command and press Enter to rename the SoftwareDistribution Folder

ren SoftwareDistribution SD_OLD
Restart the Windows Update Service by typing the following at the command prompt

net start WuAuServ
type Exit and Press Enter to close the command prompt

Reboot Windows

click on Start, Shut Down, and Restart to reboot Windows XP

July 7, 2011 Posted by | Windows | | Leave a comment

How to make firefox speed 5x

NOS for Firefox (make firefox speed 5x)  Just fit the NOS in your firefox (Fast Five)

1. Open Firefox and in the address bar type about:config.

2. Click on “I’ll be careful, I promise“

3. Use the search bar above to look for network.http.pipelining and double click on it to set it’s value to True.

4. Create a new boolean value named network.http.pipelining.firstrequest and set that to True, as well.

5. Find network.http.pipelining.maxrequests, double click on it, and change its value to 8.

6. Look for network.http.proxy.pipelining and set it to True.

7. Create two new integers named nglayout.initialpaint.delay and content.notify.interval, set them to 0.

8. Restart your browser.

All done. You should feel the browser is 5x more responsive than before while navigating websites.

July 6, 2011 Posted by | Tips & Tricks, Unix/Linux, Windows | , , , | Leave a comment

How to disable USB Port on Linux

Disabling USB drive or THUMB drive is considered as a very good security option to be implemented on server. To prevent theft of data by non-legitimate users.  Here are couple of ways in which you can disable USB drive in Linux OS.

METHOD :- 1 :- By editing /boot/grub/grub.conf

# vi /boot/grub/grub.conf

Just add “nousb” at the end of the kernel line in /boot/grub/grub.conf file.
and then “reboot” your machine.

METHOD :- 2 :- Removing the driver from default location.

# ls /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage.ko

# mv /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage.ko /root

In this method, I had moved the usb-storage.ko driver (or module) from its default location to some other place (/root in this case)

METHOD :- 3 :-  Using BLACKLIST option.

Remove the module, if it is already loaded.

# modprobe -r usb_storage

Put the name of the usb_storage module in the blacklist

# vim /etc/modprobe.d/blacklist and append – blacklist usb_storage

Now if you try to plug-in the USB it will not be detected by the system.

July 5, 2011 Posted by | Tips & Tricks, Unix/Linux | , , | Leave a comment

When regedit is not open/access in adminstrative account in Windows

If you have Windows, register editor[regedit] is not open and access to an administrative user account, you could change the registry editor options in the Group Policy Editor.

1. Click Start, Run
2. Type GPEDIT.MSC and Press Enter
3. Go to the following location
* User Configuration
* Administrative Templates
* System
4. In the Settings Window, find the option for “Prevent Access to Registry Editing Tools” and double-click on it to change.
5. Select Disabled or Not Configured and choose OK
6. Close the Group Policy Editor and restart your computer
7. Try opening REGEDIT again

July 4, 2011 Posted by | Windows | | Leave a comment

Awstats “update now” button shows blank page and cpanel error log shows “Out of Memory”

The cPanel error logs shows Out of Memory! when you click the “update now” button in Awstats. This usually happens when cPanel’s php is set with low memory. But in most of the cases this is not the issue.

Go to WHM –> Tweak Settings –> “The maximum memory a cPanel process can use before it is killed off (in megabytes). Values less than 128 megabytes can not be specified. A value of “0? will disable the memory limits.”

Set this to 0 or a higher value..

In the Awstats case, the cPanel processes memory is getting exhausted.

This can be done also by editing the file

# vi /var/cpanel/cpanel.config

maxmem=0

# /usr/local/cpanel/whostmgr/bin/whostmgr2 –updatetweaksettings

 

July 3, 2011 Posted by | cPanel | , | Leave a comment

How to clear /tmp partition

Here is following commands to clear unwanted stuff from the /tmp partition on the server?

# tmpwatch –mtime –all 48 /tmp

The above command will remove all files and folders from the /tmp which have not been accessed in the last couple of days (24×2=48). You can modify the number of hours as required.

July 2, 2011 Posted by | Tips & Tricks, Unix/Linux | , , , | Leave a comment

How to disable Mod_security rules

Case-A :- By domain, for a specific application, for a list of IPs

1) Edit the vhost/vhost_ssl.conf for the domain

# vi /var/www/vhosts/<DOMAINNAME>/conf/vhost.conf

2) Add the LocationMatch for the rule to exclude.

<LocationMatch /foo/bar.php>
  <IfModule mod_security2.c>
    SecRule REMOTE_ADDR “@pmFromFile /etc/asl/whitelist” “nolog,phase:1,allow”
  </IfModule>
</LocationMatch>

3) Add IP to /etc/asl/whitelist

echo “10.11.12.13” >> /etc/asl/whitelist

Case-B :- If you want to create a special whitelist for just that application

1) Edit the vhost/vhost_ssl.conf for the domain

# vi /var/www/vhosts/<DOMAINNAME>/conf/vhost.conf

2) Add the LocationMatch for the rule to exclude.

<LocationMatch /foo/bar.php>
  <IfModule mod_security2.c>
    SecRule REMOTE_ADDR “@pmFromFile /path/to/your/custom/whitelist_for_this_application” “nolog,phase:1,allow”
  </IfModule>
</LocationMatch>

3) Create your custom whitelist and add IP to /etc/asl/whitelist

echo “10.11.12.13” >> /path/to/your/custom/whitelist_for_this_application

Keep in mind these custom lists are *not* managed by ASL, so if you want to add IPs to these lists you will need to do it from the command line.

Case-C :- Disable Mod_security rules globally for a specific application

Add this to either you vhost.conf file, or if your want to make this global make sure this exclusion is loaded after your rules are loaded. A good place to add this in the 999_asl_user_exclude.conf file. If you don’t have this file, just create it. The system is smart enough to know to load it.

<LocationMatch /url/to/your/application>
  <IfModule mod_security2.c>
    SecRuleRemoveById 1234567
    SecRuleRemoveById 9999999
  </IfModule>
</LocationMatch>

Whats important to remember is that the LocationMatch variable must match the URL, not the path on the system.

July 1, 2011 Posted by | Mod_Security | , | Leave a comment