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?
Asked
Active
Viewed 6,623 times
-6
-
You'll simply need to reinstall to be sure. – Wesley Dec 15 '12 at 00:06
-
2Please 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 04: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 05: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
8
You can try this:
# setenforce 0
# yum erase selinux\*
# rm -rf /etc/selinux
# yum install selinux-policy-targeted
# touch /.autorelabel
# reboot

mricon
- 1,164
- 7
- 9
-
How will fiddling with the selinux labels reset the kid back to a base install? – Scott Pack Dec 15 '12 at 00:14
-
-
-
@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 09:18
1
You can accomplish this in 2 simple steps:
dd if=/dev/zero of=/dev/sda bs=4096
- Provision using the method of your choice onto your freshly cleaned drive.

Scott Pack
- 14,907
- 10
- 53
- 83
1
Format disk, reinstall RHEL 6.
Really the only way to reset "EVERYTHING".

HopelessN00b
- 53,795
- 33
- 135
- 209