From: Ken on
Is there a way to use ssh to become a role since I already have my ssh
keys in the .ssh of the role?

Basically, I need to become a role, which used to be a user, in an
automated fashion, thus not supplying password, which used to work via
ssh, but now that it's a role, does not.

Or should I use sudo? If so, is there a way to become that role via
sudo without supplying the roles' password (having already supplied keys
or something ala ssh)?

Ken
From: hume.spamfilter on
Ken <noemail.strobelight(a)spamgourmet.com> wrote:
> Is there a way to use ssh to become a role since I already have my ssh
> keys in the .ssh of the role?

No; you log in as a user, and then the user takes on that role. If you
log straight into the role, then it's not a role... it's a user.

It wouldn't work with a straight ssh in with a password, either.

> Or should I use sudo? If so, is there a way to become that role via
> sudo without supplying the roles' password (having already supplied keys
> or something ala ssh)?

Sudo is one way, "pfexec" is another. I'm fuzzy on the details, I'm afraid.

--
Brandon Hume - hume -> BOFH.Ca, http://WWW.BOFH.Ca/
From: ITguy on
> Is there a way to use ssh to become a role since I already have my ssh
> keys in the .ssh of the role?
>
> Basically, I need to become a role, which used to be a user, in an
> automated fashion, thus not supplying password, which used to work via
> ssh, but now that it's a role, does not.

You could remove the password from the role. It doesn't sound like a
very secure solution, but keep in mind that only users that have the
role assigned will be able to "su" to the role. Once the password is
gone, you should be able to do what you need with ssh and a user
account that is authorized to use the role.

$ ssh <host> su - <role> <command>