Hot Downloads

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: disabling Redhat 6.1 DHCP

disabling Redhat 6.1 DHCP 11 years 10 months ago #6952

  • necronian
  • necronian's Avatar
  • Offline
  • Frequent Member
  • Posts: 40
  • Karma: 0
I have a Redhat Linux 6.1 box at a customer's account which is providing DHCP to the network. I need to disable this DHCP, as addresses are already being provided by another server. If it is important, the box is using the Gnome interface.

I have passed this through Google several times, and have consulted Redhat's own website (the archive for older OSs is down currently) with no success.

I was wondering if someone could point me in the right direction. I am very unfamiliar with Linux, but willing to learn, yet I cannot seem to find what I am looking for.

Any assistance would be greatly appreciated. :)
The administrator has disabled public write access.

Re: disabling Redhat 6.1 DHCP 11 years 10 months ago #6955

  • nske
  • nske's Avatar
  • Offline
  • Expert Member
  • Posts: 613
  • Karma: 0
login as root in a command shell and type:

-- to disable the dhcp server from starting automatically on bootup:

rm -f /etc/rc*.d/*dhcpd

-- to stop it when running:

/etc/init.d/dhcpd stop

or

kill `ps ax |grep dhcp | grep -v grep|awk '{print $1;}'`

( or generally find the process id of dchpd process (i.e. ps -ax |grep dhcp) and kill it (kill 'PID') )
The administrator has disabled public write access.

Re: disabling Redhat 6.1 DHCP 11 years 10 months ago #7085

  • necronian
  • necronian's Avatar
  • Offline
  • Frequent Member
  • Posts: 40
  • Karma: 0
After trying rm -f /etc/rc*.d/*dhcpd, I received no response from bash.

Trying /etc/init.d/dhcpd stop, bash returned "no such file or directory."

I attempted to find the process and received two returns, /usr/sbin/dhcpd eth () which I cannot kill as it returns "Not owner" and grep dhcp which returns "no such pid."

Trying a client, the server is still distributing addresses.
The administrator has disabled public write access.

Re: disabling Redhat 6.1 DHCP 11 years 10 months ago #7088

  • nske
  • nske's Avatar
  • Offline
  • Expert Member
  • Posts: 613
  • Karma: 0
hmm maybe your redhat distribution is too old and things have different names or sth. :?

Somewhere in your /etc/init.d though, there has to be a control script for dchpd process, probably with a similar name.

The fact that you can not kill the process though, because "you are not the owner" is strange, are you sure you had logged in as root?

PS. If everything else fails, you can try the "greek solution" (not the right way, but good enough to work :lol: ), which is to remove /usr/sbin/dhcpd

(ie "mv /usr/sbin/dhcpd /usr/sbin/dchpd-no")

Remember in every case that you will need to have logged in as root!
The administrator has disabled public write access.

Re: disabling Redhat 6.1 DHCP 11 years 10 months ago #7096

  • necronian
  • necronian's Avatar
  • Offline
  • Frequent Member
  • Posts: 40
  • Karma: 0
It appears that is my issue. The root password is unknown.

This box was put in place many years ago and serves this company as a file server. No one at the location knows the root p-word, as a result, we can't get in.

It is running Red Hat 6.1 (Cartman) and was not originally supposed to function as a dhcp server. It is not clear how long this has been a problem, as we have only recently taken over the account, and was unaware there was a Red Hat on-site.

Your help is most appreciated, but it appears I now have a new problem: how to log in as root. I have access through another account, but can accomplish nothing.

Now, is there a way of resetting this password?
The administrator has disabled public write access.

Re: disabling Redhat 6.1 DHCP 11 years 10 months ago #7100

  • nske
  • nske's Avatar
  • Offline
  • Expert Member
  • Posts: 613
  • Karma: 0
you can boot from a bootable linux cd or floppy, such us knoppix, slackware's install cd, or even a minimal floppy boot disk. Then you will be root and be able to mount the "/" partition and modify the /etc/shadow (if your redhat even uses shadow, else the /etc/passwd directly!)

an example:

1) execute "mount" from the computer and see the partition where "/" is mounted (i.e. /dev/hda2)

2) boot from the bootable media, you will find your self at a root shell prompt and:
mkdir /tempdir
mount /dev/hda2 /tempdir (or the proper partition if not hda2)
cd /tempdir/etc
vi shadow (or your favourite editor, pico, nano, ..)
from the editor replace the hash of the root user, with the hash of a user whose password you know.

i.e.
root:$1$Y9HMeUao$LgqavG5mH8jkM0pJeec7F.:12753:0:::::
nske:$1$QVQpUV7G$cBGa4y32Oexhgv/QG0zZf.:12817:0:::::

if you know the password of nske, modify the root entry as:
root:$1$QVQpUV7G$cBGa4y32Oexhgv/QG0zZf.:12753:0:::::
(the bold text is the password hash)

Then save the /etc/shadow and reboot normally. If there is no /etc/shadow, do similarilly to the /etc/passwd. Just be careful to only replace the password hash ;)

I have not tried any floppy distro for a long while (I do not even have a floppy drive installed :D), so I can't recommend you a specific bootable floppy-distro (in case you can not download a whole cd iso), but there are many out there. I believe Sahirh will have a recommendation here ;)
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.082 seconds

CCENT/CCNA

Cisco Routers

  • SSL WebVPN
  • Securing Routers
  • Policy Based Routing
  • Router on-a-Stick

VPN Security

  • Understand DMVPN
  • GRE/IPSec Configuration
  • Site-to-Site IPSec VPN
  • IPSec Modes

Cisco Help

  • VPN Client Windows 8
  • VPN Client Windows 7
  • CCP Display Problem
  • Cisco Support App.

Windows 2012

  • New Features
  • Licensing
  • Hyper-V / VDI
  • Install Hyper-V

Linux

  • File Permissions
  • Webmin
  • Groups - Users
  • Samba Setup