2

First off, yes I am root. I have another account setup without shell privileges, and without a home directory (for icecast), that now I want to be able to run a script from that uses private key based access to run an ssh script on another machine. So, if there is a shortcut to that goal, great, If not, I want to know how to allow the user icecast to have normal shell access and a home directory so I can setup private key like normal.

Here's what I'm using it for. Icecast (a live audio broadcasting server) allows me to configure a script to run whenever the source dies. I'm going to write a script that ssh's to the source and runs a script if the audio program has crashed. But since icecast has limited privileges I don't know how to setup private keys since it has no home directory and I can SU to icecast from root.

Commands should be terminal commands, as there is no GUI installed.

3
  • What is the source? You seem to be using it to mean both "The icecast service" and "The icecast server". What exactly is your setup? Is everything running on the same machine? Is icecast running on a different, dedicated server? You want to ssh from where to where? As who? Can't you run everything as root?
    – terdon
    Jan 28, 2013 at 18:12
  • So I can make my question clear to everyone, please tell what statement made it seem like I was using the term source for anything other than the remote machine that sends audio to the icecast server? The server can detect when a source disconnects and run a script. In that script on the server , I need to ssh to the remote audio source to run commands to restart the stream. The best way to do that is with private keys so I'm not storing ssh passwords in scripts. But since my current icecast user on the server cannot be SU'd to, I don't know how to use private keys for scripts run as icecast
    – UserZer0
    Jan 28, 2013 at 22:12
  • Thanks, that clears it up. In that case what I have suggested is probably the easiest way. Now that I know you mean "remote machine" you did indeed use source consistently, I had just not understood that "source" was a remote machine.
    – terdon
    Jan 28, 2013 at 22:17

1 Answer 1

2

To give the existing user "icecast" a $HOME directory, try this (as root):

usermod -d /home/icecast -g icecast -s /bin/bash icecast

There are probably better ways of doing what you want but I cannot really understand what you are asking for. I would be happy to update this answer if you clarify your question.

You must log in to answer this question.

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