There are many methods to do this and I will be covering some of these methods here
These methods has been successfully tested on RHEL and CentOS but I am also sure it will work on many other Linux distributions.
 
Disabling CD/DVD ROM
 
1. Method:
 
A more practical and reversible way is to rename the kernel module
Log into the linux system and enter the following inputs on the system console
 
[root@lnxesx ~]# cd /lib/modules/$(uname -r)/kernel/drivers/cdrom
[root@lnxesx cdrom]# ls
cdrom.ko-ok
[root@lnxesx cdrom]# mv cdrom.ko cdrom.ko-ok
 
Disabling USB Port

1. Method:

Similarly to the method used above for CD/DVD ROM, USB ports can be disabled using same method as well.
 
[root@lnxesx ~]# cd /lib/modules/$(uname -r)/kernel/drivers/usb/storage
[root@lnxesx storage]# ls
ums-alauda.ko   ums-datafab.ko  ums-isd200.ko    ums-karma.ko     ums-sddr09.ko  ums-usbat.ko
ums-cypress.ko  ums-freecom.ko  ums-jumpshot.ko  ums-onetouch.ko  ums-sddr55.ko  usb-storage.ko-ok
[root@lnxesx storage]# mv usb-storage.ko usb-storage.ko-ok
 
2. Method:
 
Grub option
 
You can get rid of all USB devices by disabling kernel support for USB via GRUB. Open grub.conf or menu.lst (Under Debian / Ubuntu Linux) and append “nousb” to the kernel line as follows:
 
kernel /vmlinuz-2.6.18-128.1.1.el5 ro root=LABEL=/ console=tty0 console=ttyS1,19200n8 nousb
 
Written on December 25th, 2012 , Linux, Recent Posts
A common security concern at organizations is allowing users to plug in a usb flash drive, because they could so easily copy corporate data.
 
To Enable or Disable USB port:
 
1. Method:
 
1. Click Start, and then click Run.
2. In the Open box, type regedit, and then click OK.
3. Locate, and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor
4. In the right pane, double-click Start.
5. In the Value data box, type 3 to Enable and 4 to disable, click Hexadecimal (if it is not already selected), and then click OK.
6. Quit Registry Editor.
 
2. Method:
 
Since Windows XP SP2, you can disable writing to USB devices altogether using a simple registry hack. Here it is:
 
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies]
“WriteProtect”=dword:00000001
 
You can also just download one of the following registry tweaks to enable or disable writing to USB drives.
 
Enable USB Write
 
Disable USB Write
 
Once you use the registry hack, you will have to reboot for the changes to take effect. One should also note that if you are using this trick, you should make sure that the users are not administrators on the computer, because they could easily change this setting back.
 
This works on Windows Vista as well. Here’s the window you’ll get when you try and write to a USB drive: 
 
 
To Enable or Disable CD/DVD  ROMport:
 
1. Click Start, and then click Run.
2. In the Open box, type regedit, and then click OK.
3. Locate, and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\cdrom
4. In the right pane, double-click Start.
5. In the Value data box, type 1 to Enable and 4 to disable, click Hexadecimal (if it is not already selected), and then click OK.
6. Quit Registry Editor.
 

I must admit, I have never had this bug for a very loong time. I thought It must have been fixed or rather removed all together. It was first reported with RHEL 6.1 and was removed as commented here by the developers.

However, I came accross this bug again while trying configure one of my DNS servers running on CentOS 6.3. The DNS (named) service always stopped on the following

Problem:

#service named restart

Generating /etc/rndc.key:

Solution:

Just exceute the following command:

#rndc-confgen -a -r /dev/urandom

and if you’re runing chroot under /var/named/chroot, you must add “-t /var/named/chroot” to the command above. It should look like this:

#rndc-confgen -a -r /dev/urandom -t /var/named/chroot

More description to rndc-confgen can be found here

You should be able to start DNS (named) service after executing these commands.

Good luck ;-)

Written on November 27th, 2012 , DNS, Linux, Recent Posts

Download the network installation iso file and burn to CD.

Place the CD in the CD-Rom and reboot the system.

When ask to select the network install method, choose “HTTP” and enter the following:

1) for 32 Bit
Host: mirror.centos.org
Directory: centos/6.3/os/i386

2) for 64 Bit
Host: mirror.centos.org
Directory: centos/6.3/os/x86_64

Written on November 13th, 2012 , CentOS, Linux, Linux Installation, Recent Posts

I recently used the netinstall CentOS CD to install one of my Linux systems. During the installation process, I decided to install CentOS 6.3 minimal to quiken the overall install process. After the successful installation, I decided it was time to add Gnome/GUI to the system. The following were the steps taken to achive this task.

First, it is worth mentioning that there are two versions of this installation.

a.) Short version

b.) Long version

 

STEPS:

a. ) Short version:

Start a new terminal and enter the following:

yum -y groupinstall basic-desktop basic-platform x11 fonts

b.) Long version:

yum -y install “Desktop” “Desktop Platform” “X Window System” “Fonts”

 

That’s it! It will work regardless the method used ;-)

Written on November 10th, 2012 , CentOS, Linux, Linux Installation, Recent Posts

OMOTECH Tips & Tricks is proudly powered by WordPress and the Theme Adventure by Eric Schwarz
Entries (RSS) and Comments (RSS).

OMOTECH Tips & Tricks

this blog offers tutorials based on various it-subjects