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

Thread: The SUDO Password Is Not Needed In A Bash Script ---> Is This Normal?

  1. #11
    Join Date
    Jun 2010
    Location
    asoko
    Beans
    834
    Distro
    Ubuntu

    Re: The SUDO Password Is Not Needed In A Bash Script ---> Is This Normal?

    it's my understanding that root can read/write/execute a file with 000 permissions.
    Code:
    Lucid:~$ echo hello > test1.txt
    Lucid:~$ cat test1.txt
    hello
    Lucid:~$ chmod 000 ./test1.txt
    Lucid:~$ ll | grep test1.txt
    ----------   1 user user     6 2010-09-13 10:38 test1.txt
    Lucid:~$ sudo cat test1.txt
    [sudo] password for user:
    hello
    Lucid:~$

  2. #12
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: The SUDO Password Is Not Needed In A Bash Script ---> Is This Normal?

    Indeed. root has magic powahs!
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  3. #13
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    5,837
    Distro
    Xubuntu 15.04 Vivid Vervet

    Re: The SUDO Password Is Not Needed In A Bash Script ---> Is This Normal?

    No. I don't think root has the power to execute non-executables. I just tried it. Like this:
    Code:
    echo echo It ran > test
    ./test
    sh test
    Same results whether root or not.

  4. #14
    Join Date
    Jun 2010
    Location
    asoko
    Beans
    834
    Distro
    Ubuntu

    Re: The SUDO Password Is Not Needed In A Bash Script ---> Is This Normal?

    Quote Originally Posted by The Cog View Post
    No. I don't think root has the power to execute non-executables. I just tried it. Like this:
    Code:
    echo echo It ran > test
    ./test
    sh test
    Same results whether root or not.
    hmmm, your right. I guess being able to chmod any file is sufficient for making sure root doesn't get locked out.

Page 2 of 2 FirstFirst 12

Tags for this Thread

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
  •