Thanks, Greg.

Greg Wooledge:
> On Thu, Sep 22, 2016 at 03:35:00PM +0000, Stephan Beck wrote:
>> Sorry, Tomas, it's not Gene, it's me who has a special question
>> concerning ssh.
>> If you create a new user account ("test"), doing as root
>> adduser --disabled-password test
>> How can you access this new account to generate an ssh key pair there?
> Install sudo if you haven't already.  Then:
> sudo -u test bash
> Or if you don't want a whole shell:
> sudo -u test ssh-keygen [options]
> The su program is not as useful for this kind of task, because it
> insists on launching the target user's shell, which in some cases is
> not a useful interactive command shell (e.g. /bin/false).  sudo does
> not have this restriction.

In my case all users have /bin/bash, so there's no problem.



Reply via email to