FedoraForum.org - Fedora Support Forums and Community
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2005
    Location
    Earth... sometimes
    Posts
    383

    Let normal user run script that needs root pemissions

    Heya,

    I have a script that contains stuff that needs root permissions, mounts n such. I want normal users to be able to run it though, how can i go about this?

    I remember it been possible, i just cant remember how :/

    Cheers
    _________________________________
    Cheers to the community for all the awsome work :)
    HP Proliant N36L Microserver Os: FC19-MATE Ram: 2x4 gig DDR3 1333C8 Video Card: Nvidia GTX520
    Main PC Os: FC15, Win7 CPU: Intel i7-2600K Ram: 2x4 gig DDR3 1600C7 Video card: Nvidia EVGA GTX570-OC

  2. #2
    Join Date
    Sep 2006
    Location
    Connellsville, PA, USA
    Posts
    11,308
    Code:
    chmod +s <filename>
    causes executable to be run with permissions of owner (i.e., root), if the file is executable.

    Regards,
    Vince

  3. #3
    Join Date
    Dec 2004
    Posts
    108
    Sbit on scripts does not work. You should use sudo.
    Because the script is read by the shell, does not run itself.

    add a line like nesxt , to the file /etc/sudoers

    "user" "servername"="fullpath/scriptname"

    But watchout, It could be easy to change the script for a regular user.
    So this can be potentialy dangeroes.
    You should make the script of root, with no write permissions, in a place regular users cannot overwrite.

  4. #4
    Join Date
    Jun 2005
    Location
    Earth... sometimes
    Posts
    383
    sbit was what i was thinking of, looks like ill have to sodo, thx for the tip kuifje00
    _________________________________
    Cheers to the community for all the awsome work :)
    HP Proliant N36L Microserver Os: FC19-MATE Ram: 2x4 gig DDR3 1333C8 Video Card: Nvidia GTX520
    Main PC Os: FC15, Win7 CPU: Intel i7-2600K Ram: 2x4 gig DDR3 1600C7 Video card: Nvidia EVGA GTX570-OC

Similar Threads

  1. Replies: 9
    Last Post: 26th March 2005, 03:40 PM
  2. Can't login as normal user...only as root
    By zipper in forum Using Fedora
    Replies: 3
    Last Post: 5th February 2005, 05:32 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
  •