[SOLVED] Allowing users to halt computer with sudo without password

Hi Archers.
First of all, I'd like to say that I've read the Wiki page about that but this is not exactly what I want.
What I want is to allow all users to halt, and reboot my computer while they are using sudo, without asking them a password BUT only with these commands (halt and reboot). The prompt have to ask for a password for all the rest (using pacman...)
I would like to do this in a clean, and comprehensible way.
Thanks
Last edited by Lowra (2011-03-12 21:34:32)

Lowra wrote:
The example provided in visudo will allow a user, or a group of user to execute all the commands without asking for a password. This is not what I want.
The example in the wiki does roughly what I want, but applies to only one user and one hostname.
I would like to make it applies to all the users of my system, and without defining any hostname in my /etc/sudoers. I'm writting a little guide for a couple of people, and I wouldn't like to add in it anything which depends on a custom hostname...
%somegroup ALL=ALL NOPASSWD: /sbin/halt,/sbin/reboot
Or you could use consolekit.

Similar Messages

  • [SOLVED] Allow to run some programs in sudo witout password

    Hello!
    The problem i have is due to some commands I wish to run without having to write the password every time, as hibernate-ram, poweroff, or a custom script to change the brightness (I use a Samsung R530, and the fn keys don't work by themselves). I googled the problem, and did as it is said on the sudoers file (using visudo), but even if i think the syntax is correct, there are not any changes; it continues asking me for password. How can I fix that?
    I include a copy of my sudoers file, maybe my lack of experience with sudo don't allow me to see a syntax error.
    # This is /etc/sudoers file.
    # This file MUST be edited with the 'visudo' command as root.
    # Failure to use 'visudo' may result in syntax or file permission errors
    # that prevent sudo from running.
    # See the sudoers man page for the details on how to write a sudoers file.
    # Root is allowed to run all commands:
    root    ALL=(ALL) ALL
    alvarez ALL=(ALL) ALL
    alvarez ALL =(root) NOPASSWD: /usr/bin/controlbrillo
    # Allow members of group wheel to run all commands:
    %wheel    ALL=(ALL) ALL
    # Allow members of group power to shutdown and reboot the computer:
    %power ALL = NOPASSWD: /sbin/shutdown,/sbin/halt,/sbin/reboot
    # Allow members of group power to use hibernate and suspend:
    %power ALL = NOPASSWD: /usr/sbin/pm-hibernate,/usr/sbin/pm-suspend
    # Allow members of group power to change CPU frequenzy scaling governor:
    %power ALL = NOPASSWD: /usr/bin/cpufreq-set
    # Allow members of group network to use wvdial for call-up network connection:
    %network ALL = NOPASSWD: /usr/bin/wvdial,/usr/bin/killall wvdial,/usr/bin/poff
    # Allow members of group video to change screen settings catalyst driver:
    %video ALL = NOPASSWD: /usr/bin/amdcccle
    Thanks in advance
    Last edited by vladimir_1922 (2011-10-19 23:13:45)

    Here's what I use (single user mode), which is a little different than yours, OP:
    root ALL=(ALL) ALL
    dspider ALL=(ALL) ALL
    dspider ALL=NOPASSWD: /bin/mount, /bin/umount
    dspider arch=NOPASSWD: /sbin/reboot, /sbin/poweroff
    I'm guessing instead of "/sbin/poweroff" you could add your own command/script (path included).
    "dspider@arch" -- obviously replace the user and hostname accordingly... Probably something like this:
    alvarez your_hostname=NOPASSWD: /usr/bin/controlbrillo
    Hope this helps.
    Last edited by DSpider (2011-10-18 22:34:54)

  • HT202213 I have 3 users on one computer with 3 unique user accounts.  Each have unique ITunes accounts.  How do we share our music libraries using home sharing?

    I have 3 users on one computer with 3 unique user accounts.  Each of us have separate and unique ITunes accounts.  How do we share our music libraries using Home Sharing?  Everything that I can find talks about sharing between networked computers, but this is all on the same computer.  I just want to share between ITunes accounts.  Thanks!

    Hi b noir, I also have two users on one pc with two different iTunes libraries.  But I also want to put them onto an external hard drive so that I can free up some memory on the pc.  So I figure I need to consolidate the two users iTunes libraries first before moving to hard drive?  But not quite sure how to do that on the iTunes 11?  Thanking you in advance!!

  • I have multiple users on my computer with separate iTunes libraries.  can we share?

    I have multiple users on my computer with separate iTunes libraries.  Is it possible to share the libraries?  The "share library" preference doesn't seem to work.

    Hi b noir, I also have two users on one pc with two different iTunes libraries.  But I also want to put them onto an external hard drive so that I can free up some memory on the pc.  So I figure I need to consolidate the two users iTunes libraries first before moving to hard drive?  But not quite sure how to do that on the iTunes 11?  Thanking you in advance!!

  • HT201320 PLEASE HELP - I changed my email password on my computer...the email is also on my iPad...I can log on the computer with the 'new' password, however, the iPad is not allowing me to log in.  I continue to get the incorrect password message.  Pleas

    PLEASE HELP - I recently changed my email password on my computer...the email is also on my iPad. I can log on the computer with the 'new' password, however, the iPad is not allowing me to log in.  I continue to get the 'incorrect password' message.  Please advise.

    I'm sorry you're having issues with your e-mail account on your phone Rusty1112. Let's figure out what's going on. First, please try deleting account/information again and then restart phone. When phone is back on, try adding e-mail account again, and be sure you're entering exactly as you set up, meaning its case-sensitive. If you're still getting same error, please let us know and let us know what e-mail account it is, Yahoo, AOL, MSN, etc.
    Thank you,
    VanessaS_VZW
    Follow us on Twitter @VZWSupport

  • I changed my Apple ID and password last week.  Today I cannot get into my computer with the new password..help!

    I changed my Apple ID and password last week.  Today I cannot get into my computer with the new password..help!

    Your Apple id password is not necessarily the same as your log-in password.
    The former is what you use to log-in to Apple services and sites. The latter is what you use to login to your computer. That does not change when you change your Apple ID password. Try the original computer login password.

  • 12 users log onto 1 computer with their unique password, firefox will not open for them.

    I have multiple users (12-15) that share a computer. I installed firefox under my login (Admin). it opens on my login , but none of the other users can open firefox with their login. I have other computers that everyone can use firefox on their login so it is unique to this single computer.
    == This happened ==
    Every time Firefox opened
    == since installing firefox under my login.

    I have exactly the same issue. After FF upgraded on its own to version 5, it won't open from start menu, taskbar, desktop icon, or even by pressing firefox.exe in program files directory. It does so by pressing a link at msn messenger, inside Outlook etc.
    Disabling all addons, didn't help. Moreover, I can't start FF in safe mode or start profile manager (Start > Run> firefox.exe -ProfileManager).
    OS: Windows 7 64bit
    Windows Event Viewer entry details:
    Faulting application name: firefox.exe, version: 5.0.0.4183, time stamp: 0x4df95302
    Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
    Exception code: 0xc0000005
    Fault offset: 0x8c724fa6
    Faulting process id: 0xc0c
    Faulting application start time: 0x01cc37fe2fae7e8b
    Faulting application path: C:\Program Files (x86)\Mozilla Firefox\firefox.exe
    Faulting module path: unknown
    Report Id: 6e7f03eb-a3f1-11e0-8f4d-a4badb0238f6

  • How do i share music between 2 users on one computer with ipod nano 7th generation

    How do I share music on itunes between 2 users on 1 computer and get the music from the computer onto my ipod nano 7th generation?

    Hi kstrenge,
    Welcome to the Apple Support Communities!
    I understand you want to share iTunes music on the same Windows XP computer between two different user accounts. To accomplish this please read over and follow the steps in the attached article.
    iTunes: How to share music between different user accounts on a single computer
    http://support.apple.com/kb/HT1203
    Once the music is shared and you are ready to sync your music from the computer to your iPod nano, please follow the steps in this article.
    iTunes: Syncing media content to iPod
    http://support.apple.com/kb/HT1351
    Have a great day,
    Joe

  • My windows 7 laptop with current itunes working will not recognize my ipod touch as new hardware/device. I tested my usb port, rebooted computer with and without ipod - no luck. Ideas?

    Mested usb port-oky windows 7 laptop with current itunes working will not reognize my ipod as a new device/hardware.  I have tested usb port-ok; rebooted with and without ipod plugged - no luck. Ideas?

    Not uncommon. Start here:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows

  • No power to computer with or without plug and reset button on battery not responding. New battery?

    No power to MacBook Pro with or without plug; no response from battery reset button.  New battery?

    That can depend on what variant of the MacBook Pro you have. The MacTracker database shows 33 major variants since 2006.
    First, does your MacBook Pro have silver or black keys? That is a good place to start because black-key models do not have a quick-change battery. Batteries were historically less reliable in the silver key versions.

  • [Solved] Switching users on lightdm-unity with MATE

    Hi, I have yet another question.
    How can you switch users with MATE while lightdm-ubuntu with lightdm-unity-greeter is installed? I looked everywhere, but I did not find anything.
    Thanks.
    FIXED:
    Basically, there was a gdmflexiserver file in /usr/lib/lightdm/lightdm, so after some deductive reasoning, I was like, hey, maybe it should be in /usr/bin?
    so I did "sudo ln -s /usr/lib/lightdm/lightdm/gdmflexiserver /usr/bin/gdmflexiserver" and now both the Switch User prompt AND the xscreensaver New User button works! ^o^
    Last edited by Technicolor (2012-10-12 21:35:00)

    WonderWoofy wrote:
    @Technicolor, FYI "bumping" is frowned upon in these forums.  Also, you are not likely to get your hand held around here.  It is great that you are a new user and have taken the first steps to becoming a learned Linux user, but that learning is best done for yourself.  If you are simply given the answer, it will encourage you to not make an attempt to understand why you are doing what you are doing.
    So good luck, and I hope you enjoy Arch and all of its... simplicity!
    Oic. Yeah, it's just I'm used to being talked to as if I was an idiot (and usually I am ) Yeah, I'll attempt at not breaking my PC while doing this change.
    Simplicity.
    You mean reading the wiki every two seconds.

  • Acrobat Pro X - How to allow user to save form with data

    I'm evaluating the trial version to make sure it does what we want.  I want the user to be able to save a form to their PC with the data they've typed in.  In my search of the forums I found an answer that said to look at File > Save As > Reader Extended PDF but for me all of the further sub-choices are greyed out.  Is this a limitation of the trial or am I on the wrong trail?  Does the software have the feature we want, and if so, how do I add it to my form?
    many thanks for your help

    OK I think I answered my own question.  When I re-opened the file and looked at the options they were no longer greyed out.  That's a strange way for software to work, but I guess that's par for Adobe.

  • [SOLVED] ARCH install on EFI computer with GPT

    Hello everyone. I'm having a problem with installation of arch. When i boot with pendrive "made" with dd i get some "Install override security policy" (or something like that) anyway i can't "edit" pendrive after dd so i create MSDOS partition table and format as FAT32 and copy content of the iso to the pendrive. Boots the same so i googled that i have to overwrite grubx64.efi with loader.efi so i done that and it boots fine. But pendrive doesn't install grub it says that my system doesn't support efi, so i followed this and and from google i read about  i have to activate efivars with modprobe but it doesn't work either. I tried EFI install with VirtualBox but error still is the same. Anybody installs arch on UEFI machine ?? Ubuntu (and Xubuntu, Lubuntu...) & Fedora works fine with UEFI install. I don't want to move disk to MBR because of MBR limitations (for example only four primary partitions) and i have important data on the disk so i can't do that.
    I tried Arch based distros and there are also problems with install. Manjaro after install shows that UEFI variables wasn't detect properly ( or something like that). Antergos doesn't boot because there is not necessary files (who even release that? this doesn't even work in virtual box) after adding these files i've get 30 seconds Arch problem because label is incorrect antergos says that label have to be ANTERGOS201311 and i can't give that label because FAT32 has 11 characters limitation and if i tried work it out with ext4 it doesn't work at all (there is no prefix UEFI in boot options). I can't also solve that with dd because i have to paste missing files to the pendrive and dd make pendrive unwritable.
    Doesn't matter, issue solved. All i have to do is to
    mount -t efivarfs efivarfs /sys/firmware/efi/efivars
    Last edited by maslascher (2013-12-01 11:04:49)

    That all depends on the settings you give your VM, you can make it virtualize either a BIOS or a UEFI machine irrelevant of the host firmware.
    https://www.virtualbox.org/manual/ch03.html#efi
    I'm not sure if UEFI is still considered experimental or how well it works, as I always just use BIOS mode.
    Last edited by slithery (2015-06-12 20:17:46)

  • [solved] sharing internet from windows computer with arch laptop

    Title is descriptive I think. Stuck on windows on my desktop because I did a thing and don't feel like fixing it yet
    I used ICS but the laptop couldn't access the internet and I read someplace that it only works between a windows client and host, and I couldn't find how to do it between a windows host and linux client of any sort.
    If it's relevant I'm using a regular yellow ethernet cable (forget which one that one is) and my desktop has a gigabit ethernet card.
    Last edited by kinkinkijkin (2015-01-05 01:49:54)

    If you want make your laptop as access point, then see here
    Otherwise, from the Arch side, the wiki is the best place to start from.
    Or see this topic is of your interests.
    If these are none of your intents, please explain which is the computer and OS connected to internet and which is the computer and OS wants to access the internet.
    What are the results of your trials, what steps have you done ?
    More details of your doing and targetted answers will be the result.
    Modern NICs don't need cross cable, the NIC will detect and self adjust the connection. If one of the two PS is less modern then you need a cross CAT5 cable.
    Last edited by TheSaint (2014-12-29 02:08:37)

  • Is there a way to un-sync my iPod from one computer and then sync it to another computer with iTunes without losing all my data or downloading software?

    Hi, I'm selling my current computer that my iPod is synced to and want to un-sync (I think the correct term of phase is) my iPod from my current computer, so i can then sync it to my new computer without downloading any software or deleting all my data. Is this possible? If so, please tell me how. As usual, any help would be helpful.

    Do this:
    - iTunes: Back up your iTunes library by copying to an external hard drive
    - Then import into your new computer
    - Copy any synced photos to the new computer
    - Backup the ipd to the new computer
    iOS: How to back up
    - Restore the iPod from that backup. The link directly above says how.

Maybe you are looking for

  • Dynamic display of fields of table in ALV report.

    To display the records of a table in ALV report dynamically such that first 10 fields of the table should only be displayed excluding 'mandt' field . That is field no 2nd to 11th should be displayed.

  • How can I re-download a digital booklet?

    I know we have the beta of iCloud but they don't list digital booklets for download. I have a booklet that seems to be corrupt and would like to re-download it. Any easy way to do this with out contacting customer service? Thanks!

  • Windows 64-bit + OBIEE 11g + Internet Explorer 10

    Not a question this time, just an observation about the interaction between OBIEE 11.1.1.6.0 and IE 10 on 64-bit Windows. After installing OBIEE 11.1.1.6.0 on 64-bit Windows, the Analytics environment worked fine in IE 10. When starting BI Services f

  • I CANT CREAT APPLE ID IN ZAMBIA

    im having problems in creating an apple id in Zambia. it is asking for my credit cards information which im also providing but its not working. is there a way i can open an apple id with using credit card on my iphone4?

  • CS3 and CS4 Together

    I currently have CS3 Production Premium installed on my computer and am looking at purchasing CS4 Design Premium. What happens to those common programs (i.e., photoshop, illustrator, etc) when I install CS4 Design Premium? For example, will I end up