FedoraForum.org - Fedora Support Forums and Community
Results 1 to 14 of 14
  1. #1
    Join Date
    Jan 2010
    Location
    Tokyo, Japan
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I disable selinux on F18?

    SELinux is crap, all the problem I had on my new install of Fedora 18 (chrome crashing, plugins problems, samba) were caused by it, as for the security of a desktop computer it is irrelevant, all the companies I work for even the ones with sensitive information and a large base of RHEL server had SELinux disabled.

    As for the settings that's quite confusing after a few problems I tried to disable it by modifying the /etc/sysconfig/selinux file,
    then another problem came along and after a few hour I realized it came do to SELinux being still enabled.

    On my system there is two different file and I guess one is not taken
    into account, I think it would be better to disable SELinux in the next release.
    I guess the relevant one is /etc/selinux/config

    Code:
    $ lsb_release -a
    LSB Version:	:core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
    Distributor ID:	Fedora
    Description:	Fedora release 18 (Spherical Cow)
    Release:	18
    Codename:	SphericalCow
    
    $ rpm -qf /etc/sysconfig/selinux /etc/selinux/config
    selinux-policy-3.11.1-73.fc18.noarch
    selinux-policy-3.11.1-73.fc18.noarch
    
    $ ls -i  /etc/sysconfig/selinux /etc/selinux/config
    1050081 /etc/selinux/config  1054054 /etc/sysconfig/selinux
    
    $ grep SELINUX= /etc/sysconfig/selinux /etc/selinux/config
    /etc/sysconfig/selinux:SELINUX=disabled
    /etc/selinux/config:SELINUX=enforcing
    Sorry, I realize now that I brought back a very old thread, but that's the one that came back when I searched on howto disable SELinux.
    Last edited by tokyojoe; 8th February 2013 at 01:20 AM. Reason: selinux,disable
    GIGABYTE F2A75M-D3H / AMD A8-5600K / Radeon HD 7560D / Fedora release 18 (Spherical Cow)

  2. #2
    bob's Avatar
    bob is offline Administrator -- On Leave
    Join Date
    Jul 2004
    Location
    Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
    Age
    81
    Posts
    25,245
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I disable selinux on F18?

    Moved to it's own thread. Don't try to add to a dead one, just start a new thread. I suppose you're asking a question, right? Need to disable SELinux? Maybe make it Permissive instead?

    Frankly, I haven't had a problem with F17 or F18 leaving it intact, but if it solves your problem, then let's have someone give you a quick fix. http://forums.fedoraforum.org/showthread.php?t=281664
    Linux & Beer - That TOTALLY Computes!
    Registered Linux User #362651


    Don't use any of my solutions on working computers or near small children.

  3. #3
    Join Date
    Jan 2010
    Posts
    8,697
    Mentioned
    41 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I disable selinux on F18?

    To permanently disable it, edit /etc/sysconfig/selinux and change enabled to disabled. This requires a reboot.

    If you think there's any chance you might want to work with it in the future, you can also change it to permissive. This means that it will give warnings but won't block anything.

    For better or worse, it's going to continue to be included, but it's very easy to disable.

  4. #4
    Join Date
    Mar 2011
    Location
    /
    Posts
    5,242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I disable selinux on F18?

    As smr54 has mentioned above, you can easily set it to permissive/disabled. To set it to permissive, try

    Code:
     setenforce 0
    as an alternative to editing configuration file.

  5. #5
    Join Date
    May 2008
    Posts
    621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I disable selinux on F18?

    security of a desktop computer it is irrelevant
    This is why we can't have nice things
    Come join us on #fedora-selinux on irc.freenode.org
    http://docs.fedoraproject.org/selinu...ide/f10/en-US/

  6. #6
    Join Date
    Mar 2008
    Location
    Georgia, USA
    Posts
    147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I disable selinux on F18?

    Quote Originally Posted by domg472
    This is why we can't have nice things
    Ha-ha, excellent quote.
    Marc F. | fergytech.com
    Registered Linux User #410978

    "Let the blind lead the blind... it's more fun to watch."

  7. #7
    Join Date
    Jan 2010
    Location
    Tokyo, Japan
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I disable selinux on F18?

    Quote Originally Posted by smr54
    To permanently disable it, edit /etc/sysconfig/selinux and change enabled to disabled. This requires a reboot.
    Actually the one you need to modify is /etc/selinux/config,
    if you set SELINUX to disabled in /etc/sysconfig/selinux and reboot, SELinux will still be enabled.

    Both file have different inode and are part of the selinux-policy package,
    don't know if there is a reason for that but that's quite confusing.

    Code:
    [~]$ sudo ls -li  /etc/sysconfig/selinux /etc/selinux/config 
    1054076 -rw-r--r--. 1 root root 546 Feb  8 09:21 /etc/selinux/config
    1054054 -rw-r--r--. 1 root root 499 Feb  7 18:39 /etc/sysconfig/selinux
    [~]$ grep ^SELINUX= /etc/sysconfig/selinux /etc/selinux/config
    /etc/sysconfig/selinux:SELINUX=disabled
    /etc/selinux/config:SELINUX=disabled
    
    [~]$ rpm -qf /etc/sysconfig/selinux /etc/selinux/config
    selinux-policy-3.11.1-74.fc18.noarch
    selinux-policy-3.11.1-74.fc18.noarch
    GIGABYTE F2A75M-D3H / AMD A8-5600K / Radeon HD 7560D / Fedora release 18 (Spherical Cow)

  8. #8
    Join Date
    May 2008
    Posts
    621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I disable selinux on F18?

    Chances are one has been abusing sed which could have caused that file to be created and caused to link to be overwritten.

    /etc/sysconfig/selinux should be no file at all. Instead it should be a symbolic link to /etc/selinux/config

    This is fine in a fresh installed system, so likely a boo boo by the user...
    Come join us on #fedora-selinux on irc.freenode.org
    http://docs.fedoraproject.org/selinu...ide/f10/en-US/

  9. #9
    Join Date
    Jan 2010
    Location
    Tokyo, Japan
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I disable selinux on F18?

    Quote Originally Posted by domg472
    /etc/sysconfig/selinux should be no file at all. Instead it should be a symbolic link to /etc/selinux/config
    .
    That's right I did edit that file with sed, I did not know that it would remove the symlink,
    I have corrected it now, thanks for checking that !
    GIGABYTE F2A75M-D3H / AMD A8-5600K / Radeon HD 7560D / Fedora release 18 (Spherical Cow)

  10. #10
    Join Date
    Dec 2009
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I disable selinux on F18?

    I tried changeing both files to disable and the boot stopped at the Fedora Icon. I went to CTRL?ALT F1 logged in as root and put it them back to permissive. I rebooted and am back to normal. Is this normal?

  11. #11
    Join Date
    Aug 2004
    Location
    Allison Park, PA, USA, Earth, Solar System, Milky Way
    Age
    60
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I disable selinux on F18?

    Quote Originally Posted by hbaird
    I tried changeing both files to disable and the boot stopped at the Fedora Icon. I went to CTRL?ALT F1 logged in as root and put it them back to permissive. I rebooted and am back to normal. Is this normal?
    If your system is running properly, then permissive==normal until you can work out the problem. I learned to always run my systems in permissive mode to work out any issues. You can see any selinux problems with dmesg while in permissive mode (probably in enforcing as well). Don't be afraid to try setroubleshooter.
    Scott Knight

  12. #12
    Join Date
    Dec 2009
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I disable selinux on F18?

    Thank you for the reply I will go with permisive for now.
    Harold

  13. #13
    Join Date
    Feb 2007
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I disable selinux on F18?

    There should only be one file /etc/sysconfig/selinux is supposed to be a symlink to /etc/selinux/config

  14. #14
    Join Date
    Jan 2010
    Location
    Tokyo, Japan
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I disable selinux on F18?

    Today I got an error when I moved a file, even though SELinux is disabled:
    mv: setting attribute ‘security.selinux’ for ‘security.selinux’: Operation not permitted
    GIGABYTE F2A75M-D3H / AMD A8-5600K / Radeon HD 7560D / Fedora release 18 (Spherical Cow)

Similar Threads

  1. I need to Disable SELinux F17
    By Fishboyfive in forum Using Fedora
    Replies: 1
    Last Post: 27th June 2012, 04:50 AM
  2. selinux how to disable
    By fedorahack in forum Using Fedora
    Replies: 2
    Last Post: 7th June 2012, 03:07 PM
  3. How to disable SElinux?
    By ronnij in forum Security and Privacy
    Replies: 12
    Last Post: 3rd December 2009, 07:31 AM
  4. disable selinux
    By theAdmiral in forum Security and Privacy
    Replies: 23
    Last Post: 21st November 2009, 05:51 PM
  5. how to disable selinux
    By jan1024188 in forum Using Fedora
    Replies: 2
    Last Post: 5th November 2006, 03:11 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •