Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is a pretty wonky setup -- hopefully someone else has gone through this kind of setup.

I have a UPS that is connected to a bare-metal server which is running APCUPSD, which is working as expected. However, I have 6 servers which need to be gracefully shutdown whenever APCUPSD says it's time to shutdown. These six servers are a mix between ESXi 4.1 and VMWare.

My plan is to setup an account on the machine running apcupsd that will send commands to the other six servers shutting down the guest and the host machines gracefully. I'd like to create a passwordless ssh account on each machine which has permission just to shutdown the guest and host machines, but this is turning out more difficult than it seems.

What I am confused about is setting up the passwordless ssh account and limiting them to just a few commands. I've been successful at giving root a passwordless access (which is, of course, a terrible idea), but I have not been successful in creating a new user (which I've appropriately named 'ups'), giving it passwordless access to the host machine, and allowing it to shutdown the server gracefully.

What is really killing me is that ESXi is not a regular linux machine -- it's some custom software with a busybox interface, and there is no sudoers file.

Any ideas? I'd like if someone could give me some outline in creating the passwordless user and allowing it to execute specific commands as root.

share|improve this question

migrated from Sep 29 '11 at 17:54

This question came from our site for professional and enthusiast programmers.

Install sudo:

batchuser   ALL=(root) NOPASSWD: /bin/this, /usr/bin/that
share|improve this answer
How do I install sudo on this an ESXi v4.1 machine? – jungos Sep 29 '11 at 20:16
Compile from source? – grawity Sep 29 '11 at 20:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .