-5

I'm using REDHAT 6.x and I think something went wrong so I'd like to reset EVERYTHING (selinux wise) and just redo it, how would one go about it?

4
  • You'll simply need to reinstall to be sure. – Wesley Dec 15 '12 at 0:06
  • 2
    Please clarify your question -- Do you want to reset JUST THE SELINUX CONFIGURATION (as your title suggests), or EVERYTHING (as the body of your question states). The two require vastly different approaches. – voretaq7 Dec 15 '12 at 4:30
  • I didn't think RedHat 6.x had selinux, or do you need to clarrify that as well? – John Gardeniers Dec 15 '12 at 5:52
  • @JohnGardeniers RedHat is, as near as I can tell, the flagship distribution with SELinux. – Scott Pack Dec 15 '12 at 14:09
9

You can try this:

# setenforce 0
# yum erase selinux\*
# rm -rf /etc/selinux
# yum install selinux-policy-targeted 
# touch /.autorelabel
# reboot
4
  • How will fiddling with the selinux labels reset the kid back to a base install? – Scott Pack Dec 15 '12 at 0:14
  • Because he asked for a "proper way to reset SELinux?" – mricon Dec 15 '12 at 3:24
  • facepalm I read that as EL Linux. Gods I feel like a jerk. – Scott Pack Dec 15 '12 at 3:27
  • @ScottPack Well, he does say he wants to reset "EVERYTHING", not that he wants to reset "SELinux", so I think there's plenty of ambiguity to go around... – HopelessN00b Dec 15 '12 at 9:18
1

You can accomplish this in 2 simple steps:

  1. dd if=/dev/zero of=/dev/sda bs=4096
  2. Provision using the method of your choice onto your freshly cleaned drive.
1

Format disk, reinstall RHEL 6.

Really the only way to reset "EVERYTHING".

Not the answer you're looking for? Browse other questions tagged or ask your own question.