Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

closed as not a real question by John Gardeniers, mdpc, Ward, rnxrx, Lucas Kauffman Dec 15 '12 at 23:05

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
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

3 Answers 3

up vote 6 down vote accepted

You can try this:

# setenforce 0
# yum erase selinux\*
# rm -rf /etc/selinux
# yum install selinux-policy-targeted 
# touch /.autorelabel
# reboot
share|improve this answer
    
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

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.
share|improve this answer

Format disk, reinstall RHEL 6.

Really the only way to reset "EVERYTHING".

share|improve this answer

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