January 13, 2010

"IP is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions. Not enough storage is avaliable to process this command. " IP is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.

Please check some common fixes for this issue.
-----------------------------------------------------------------------------
1. First, in the registry, change the IRPStackSize, increase by 3 to 5.

- Start -> Run

- Type in "regedit" (without the quotation marks)

- Navigate to the following path by single left mouse clicking as you go:

- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\lanmanserver\parameters

- Double-left mouse click on IRPStackSize

- In the event the IRPStackSize registry setting doesn't exist, create it by single left mouse clicking on "Edit" in the menu bar and then single left mouse click on "New" followed by a single left mouse click on "DWORD Value". The new value will then appear, name the value "IRPStackSize" (without quotation marks) and double left mouse click on the icon.

- Set the decimal under Base to 11 for NT and 2000, and 15 for XP - However, when setting the decimal under Base, you may want to increase it by three with-in the range (example: 11 to 14 and so on ,up to 15 for NT and 2000 - 12 to 15 up to 20 for XP) Try the defaults first and if you are still getting the error, try moving up the range until you no longer get the error.

- Close the Registry Editor and Reboot the computer after each edit.


Second, turn "Use simple file sharing" ON, reboot the machine, then turn it OFF and reboot the machine again.
In other words, cycle the sucker. Many changes in disk shares don't actually become effective until this is done.

To turn Simple File Sharing on or off in Windows XP Professional, follow these steps:

1. Double-click My Computer on the desktop.
2. On the Tools menu, click Folder Options.
3. Click the View tab, and then select the Use Simple File Sharing (Recommended) check box to turn on Simple File Sharing. (Clear this check box to turn off this feature.)

-----------------------------------------------------------------------------------------

2. Please check the PagedPoolSize in the registry on the server?

Start the registry editor (regedit.exe)

Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management

Double click on PagedPoolSize and set to 0

Click OK

Close the registry editor

Reboot the machine

Setting the PagedPoolSize to 0 should allow NT to dynamically allocate memory.

--------------------------------------------------------------------------------------------

3. "Not enough server storage is available to process this command." error.

SYMPTOMS: When accessing shares on a server from a client, you may receive "Not enough server storage is available to process this command." error. You may receive this message and Event ID: 2011 after you install Norton Antivirus for Windows.

Resolution:
1) The registry value IRPstackSize may be not explicitly present.
To increase the value of the parameter, go to the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ LanmanServer\Parameters.
If the key is not present, choose Add Value in the Registry Editor.
The Value Name should be IRPStackSize and the Data Type is REG_DWORD.
2) Remove any unnecessary entries from this value in the registry, HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters\NullSessionPipes.
3) Disable Norton antivirus to see if that will fix the problem.

---------------------------------------------------------------------
4. "Not accessible. You may not have permission to use this network resource"

Symptom: Your WinXP, in a peer-to-peer network, may receive the following error when you double-click My Network Places/Computers Near Me: is not accessible. You may not have permission to use this network resource.

Resolution: 1) Enable NetBIOS over TCP/IP on one or more computers in the workgroup.
To do that, go to properties of Local Area Connection>properties of Internet Protocol (TCP/IP)>General> Advanced>WINS,
check Enable NetBIOS over TCP/IP (If you have a DHCP-assigned IP address, select Use NetBIOS setting from the DHCP server ).

2) Make sure the Computer Browser service is started.

January 11, 2010

Steps to allocate a maximum amount of disk space a user or group may use.

Configuration of disk usage quotas on Linux - Perform the following as root:

1. Edit file /etc/fstab to add qualifier "usrquota" or "grpquota" to the partition. The following file system mounting options can be specified in /etc/fstab


* To enable user quota support on a file system, add "usrquota" to the fourth field containing the word "defaults".

...
/dev/hda2 /home ext3 defaults,usrquota 1 1
...


* Replace "usrquota" with "grpquota", should you need group quota support on a file system.

...
/dev/hda2 /home ext3 defaults,grpquota 1 1
...


* Need both user quota and group quota support on a file system?

...
/dev/hda2 /home ext3 defaults,usrquota,grpquota 1 1
...


This enables user and group quotas support on the /home file system.

2. touch /partition/aquota.user
where the partition might be /home or some partition defined in /etc/fstab.
then
chmod 600 /partition/aquota.user

The file should be owned by root. Quotas may also be set for groups by using the file aquota.group




3. Re-boot or re-mount file partition with quotas.

* Re-boot: shutdown -r now
* Re-mount partition: mount -o remount /partition


After re-booting or re-mounting the file system, the partition will show up in the list of mounted filesystems as having quotas. Check /etc/mtab:

...
/dev/hda5 / ext3 rw,usrquota 0 0
...

4. quotacheck -vgum /partition
or
quotacheck -vguma

The options used are as follows:

* a — Check all quota-enabled, locally-mounted file systems
* v — Display verbose status information as the quota check proceeds
* u — Check user disk quota information
* g — Check group disk quota information



5. quotaon -av
System Response: /dev/hda6: user quotas turned on

quotaon - enable disk quotas on a file system.
quotaoff - turn off disk quotas for a file system.



6. edquota -u user_id
Edit directly using vi editor commands. (See below for more info.)
For example: edquota -u user1

* System Response (RH 7+):

Disk quotas for user user1 (uid 501):
Filesystem blocks soft hard inodes soft hard
/dev/hda5 1944 0 0 120 0 0


o blocks: 1k blocks
o inodes: Number of entries in directory file
o soft: Max number of blocks/inodes user may have on partition before warning is issued and grace persiod countdown begins.
If set to "0" (zero) then no limit is enforced.
o hard: Max number of blocks/inodes user may have on partition.
If set to "0" (zero) then no limit is enforced.

If editing group quotas: edquota -g group_name

To verify that the group quota has been set, use the command:

quota -g group_name


Also please note that quota is assigned in KB



7. List quotas:
quota -u user_id

For example: quota -u user1
System response:

Disk quotas for user user1 (uid 501):
Filesystem blocks quota limit grace files quota limit grace
/dev/hda6 992 50000 55000 71 10000 11000


If this does not respond similar to the above, then restart the computer: shutdown -r now



Quota Reports:

* Report on all users over quota limits: quota -q
* Quota summary report: repquota -a

*** Report for user quotas on device /dev/hda5
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 4335200 0 0 181502 0 0
bin -- 15644 0 0 101 0 0
...
user1 -- 1944 0 0 120 0 0


No limits shown with this user as limits are set to 0.



Cron:

Quotacheck should scan the file system via cronjob periodically (say, every week?). Add a script to the /etc/cron.weekly/ directory.
File: /etc/cron.weekly/runQuotacheck

* Linux Kernel 2.4: Red Hat 7.1 - Fedora Core 3:

#!/bin/bash
/sbin/quotacheck -vguma

* Linux Kernel 2.2: Red Hat 6/7.0:

#!/bin/bash
/sbin/quotacheck -v -a

(Remember to chmod +x /etc/cron.weekly/runQuotacheck)

Note: You can refer more details from the urls:

http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/ch-disk-quotas.html
http://www.yolinux.com/TUTORIALS/LinuxTutorialQuotas.html

January 1, 2010

Named internal/external issue, Not resolving from outside the server !!

Named not starting...



Hi All,

We normally receive an issue with named not running.. and all the domains are not resolving from out side. Here is the check list to fix that.

first,

Check iptables / CSF / APF... stop these firewalls..
check "host domainname serverip" from outside

Still issues, Second fix

In named.conf, there may be two sets of named entries one for Internal and other for external.

You may need add the following two lines to the external section to fix the issue.

match-clients { any; };
match-destinations { any; };

So the that part of named will look like the following,

###################
view "external" {
/* This view will contain zones you want to serve only to "external" clients
* that have addresses that are not on your directly attached LAN interface subnets:
*/

match-clients { any; };
match-destinations { any; };

recursion no;
// you'd probably want to deny recursion to external clients, so you don't
// end up providing free DNS service to all takers

// all views must contain the root hints zone:
zone "." IN {
type hint;
file "/var/named/named.ca";
};

// These are your "authoritative" external zones, and would probably
// contain entries for just your web and mail servers:

// BEGIN external zone entries

STARTS the Zone entries here
############################

Error : client denied by server configuration while installing cacti

vi /etc/httpd/conf.d/cacti.conf


Order Deny,Allow
Deny from all
Allow from 127.0.0.1 (Change this line to "Allow from all")

Cpanel script to correct mail directory's incorrect disk usage

Here is a tip from the cpanel team :

Sometimes mail accounts belonging to a particular cpanel account may show Zero disk usage, irrespective of the actual content. The following cpanel script can be used to fix this :

/scripts/generate_maildirsize --confirm --force --verbose baba38zz -- generates mail directory size for the user "baba38zz".

Please refer : https://tickets.cpanel.net/review/msg.cgi?ticketid=550573 for further clarification.

Exim Command set

1. How to remove How to remove all mails from exim queue?
==================
rm -rf /var/spool/exim/input/*

2. Deleting Frozen Mails:
==================
To remove all frozen mails from the exim queue, use the following command -
exim -bpr | grep frozen | awk {'print $3'} | xargs exim -Mrm
exiqgrep -z -i | xargs exim -Mrm

3. If you want to only delete frozen messages older than a day:
=============================================
exiqgrep -zi -o 86400 | xargs exim -Mrm
where you can change 86400 depending on the time frame you want to keep.( 1 day = 86400 seconds. ).

4. To forcefully deliver mails in queue, use the following exim command:
=====================================================
exim -bpru |awk '{print $3}' | xargs -n 1 -P 40 exim -v -M

To flush the mail queue:
======================
exim -qff
/usr/sbin/exim -qff

To clear spam mails from Exim Queue:
==============================
grep -R -l [SPAM] /var/spool/exim/msglog/*|cut -b26-|xargs exim -Mrm

To clear frozen mails from Exim Queue.
==============================

grep -R -l '*** Frozen' /var/spool/exim/msglog/*|cut -b26-|xargs exim -Mrm


To clear mails from Exim Queue for which recipient cannot not be verified.
=====================================================================
grep -R -l 'The recipient cannot be verified' /var/spool/exim/msglog/*|cut -b26-|xargs exim -Mrm

To find exim queue details. It will show ( Count Volume Oldest Newest Domain ) details.
=====================================================================

exim -bp |exiqsumm


How to remove root mails from exim queue ?
==================================

When mail queue is high due to root mails, and you only need to remove the root mails and not any other valid mails.

exim -bp |grep ""|awk '{print $3}'|xargs exim -Mrm

Replace "HOSTNAME" with server hostname


How to remove nobody mails from exim queue ?
==================================
When you need to clear nobody mails, you can use the following command.

exiqgrep -i -f nobody@HOSTNAME | xargs exim -Mrm (Use -f to search the queue for messages from a specific sender)
exiqgrep -i -r nobody@HOSTNAME | xargs exim -Mrm (Use -r to search the queue for messages for a specific recipient/domain)

Replace "HOSTNAME" with server hostname

Run a pretend SMTP transaction from the command line, as if it were coming from the given IP address. This will display Exim's checks, ACLs, and filters as they are applied. The message will NOT actually be delivered.
===========================

# exim -bh