Results 1 to 2 of 2

Thread: How to password protect a script

  1. #1
    Join Date
    Jul 2012
    Beans
    123

    How to password protect a script

    I have some scripts that might be messy if not handled correctly, is there any variation of the
    Code:
    chmod
    command that'll only allow access with a root password?

  2. #2
    Join Date
    Dec 2007
    Location
    California
    Beans
    4,900
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: How to password protect a script

    Set it to only be executable by root. Perhaps make it writabele by a group your in so you don't have to always sudo to edit it.

    Code:
    sudo chown root:sudo /myscript
    sudo chmod u=rwx,g=rw,o-rwx /myscript
    some variation on that.
    "You can't expect to hold supreme executive power just because some watery tart lobbed a sword at you"

    "Don't let your mind wander -- it's too little to be let out alone."

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
  •