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.