Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Bypass Single Command Password Prompt  (Read 4054 times)

0 Members and 1 Guest are viewing this topic.

Eniliad

    Topic Starter


    Starter

  • Older than Pokemon
    • Experience: Expert
    • OS: Windows 8
    Bypass Single Command Password Prompt
    « on: February 28, 2012, 01:26:24 PM »
    Hello,

    Running Xubuntu 11.10,

    I have an issue concerning a script that I have set to run at login. Right now, I have it set to do two things: At login, it runs xrandr to set up my multi-monitor display (set one monitor as "primary", then make the other one --right-of the first). Then, it disables power management to my wlan0 in order to solve an issue I'm having with my USB dongle (namely, Power Management chokes off power to my USB WiFI, which of course causes my Internet connection to slow down; disabling power management fixes this.)

    All is well except for one little problem: My startup .sh file now requires my password in order to run the command which disables power management to my USB WiFi device. This is rather annoying and I'd like to be able to bypass it - for this command only. Solutions I've found online require me to make exceptions to the sudo password requirement rules, which would compromise my computer's security. For obvious reasons, I'd like to avoid this. Unfortunately, the command must be executed as su - attempting to run it without su privileges returns a Permission Denied error.

    Is there a way to get just this one command, or possible file if necessary, to run a sudo command automatically?

    Eniliad

      Topic Starter


      Starter

    • Older than Pokemon
      • Experience: Expert
      • OS: Windows 8
      Re: Bypass Single Command Password Prompt
      « Reply #1 on: February 28, 2012, 10:50:30 PM »
      Added the command to /etc/rc.local. That took care of it.

      Geek-9pm


        Mastermind
      • Geek After Dark
      • Thanked: 1026
        • Gekk9pm bnlog
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: Bypass Single Command Password Prompt
      « Reply #2 on: February 29, 2012, 01:40:12 AM »
      Thanks for sharing. That is a goo trick to know.  8)

      Salmon Trout

      • Guest
      Re: Bypass Single Command Password Prompt
      « Reply #3 on: February 29, 2012, 11:01:49 AM »
      Thanks for sharing. That is a goo trick to know.  8)

      It's as much a "trick" as adding a line to autoexec.bat was in the days of MS-DOS.