Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Can't edit /etc/resolv.conf file as root

  1. #11
    Join Date
    Jun 2010
    Location
    Turkiye
    Beans
    6
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Can't edit /etc/resolv.conf file as root

    root@webserver:/# lsof /etc/resolv.conf
    root@webserver:/# lsof /etc
    root@webserver:/#

  2. #12
    Join Date
    Nov 2004
    Beans
    560
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Can't edit /etc/resolv.conf file as root

    just to be sure it's not the filesystem. can you edit /etc/hosts (or any other file below / )?

  3. #13
    Join Date
    Jun 2010
    Location
    Turkiye
    Beans
    6
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Can't edit /etc/resolv.conf file as root

    i can edit /etc/hosts and other system files.

    root@webserver:/# vim -w /etc/resolv.conf
    i can append /etc/resolv.conf and save, but i can't edit this file

  4. #14
    Join Date
    Nov 2004
    Beans
    560
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Can't edit /etc/resolv.conf file as root

    hmmm. and brute force: delete and recreate? it does not work anyway now with your current resolv.conf, right?

  5. #15
    Join Date
    Jun 2010
    Location
    Turkiye
    Beans
    6
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Can't edit /etc/resolv.conf file as root

    i solve the problem, thanks everybody..


    root@webserver:~# lsattr /etc/resolv.conf
    ----ia------------ /etc/resolv.conf

    root@webserver:~# chattr -a /etc/resolv.conf

    root@webserver:~# lsattr /etc/resolv.conf
    ----i------------- /etc/resolv.conf

    root@webserver:~# chattr -i /etc/resolv.conf

    root@webserver:~# lsattr /etc/resolv.conf
    ------------------ /etc/resolv.conf

    root@webserver:~# vim /etc/resolv.conf
    root@webserver:~#


    i found the solution from this blog
    Make your files immutable which even root can't delete

  6. #16
    Join Date
    Sep 2005
    Beans
    25
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Can't edit /etc/resolv.conf file as root

    Quote Originally Posted by azmiuzun View Post
    i solve the problem, thanks everybody..

    root@webserver:~# chattr -i /etc/resolv.conf

    i found the solution from this blog
    Make your files immutable which even root can't delete
    thanks. you saved my day

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

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