[
https://issues.apache.org/jira/browse/CLOUDSTACK-8339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14558170#comment-14558170
]
ASF GitHub Bot commented on CLOUDSTACK-8339:
--------------------------------------------
Github user remibergsma commented on the pull request:
https://github.com/apache/cloudstack/pull/288#issuecomment-105224256
@bhaisaab Tested with non-privileged user (now uses sudo) and with root
user (does not use sudo) and both just add the host as one would expect.
As user 'cloudstack':
```
May 25 07:29:00 kvm2 sshd[6938]: Accepted password for cloudstack from
192.168.x.x port 39542 ssh2
May 25 07:29:00 kvm2 sshd[6938]: pam_unix(sshd:session): session opened for
user cloudstack by (uid=0)
May 25 07:29:03 kvm2 sudo: cloudstack : TTY=unknown ; PWD=/home/cloudstack
; USER=root ; COMMAND=/bin/cloudstack-setup-agent -m 192.168.x.x -z 2 -p 2 -c 3
-g 57acd541-cd37-34ea-af6a-dc6ecd007325 -a --pubNic=cloudbr0 --prvNic=cloudbr0
--guestNic=cloudbr0 --hypervisor=kvm
May 25 07:30:04 kvm2 sshd[6942]: Received disconnect from 192.168.22.61:
11: Closed due to user request.
May 25 07:30:04 kvm2 sshd[6938]: pam_unix(sshd:session): session closed for
user cloudstack
```
As user 'root':
```
May 25 07:33:16 kvm2 sshd[7376]: Accepted password for root from
192.168.22.61 port 39543 ssh2
May 25 07:33:16 kvm2 sshd[7376]: pam_unix(sshd:session): session opened for
user root by (uid=0)
May 25 07:34:21 kvm2 sshd[7376]: Received disconnect from 192.168.22.61:
11: Closed due to user request.
May 25 07:34:21 kvm2 sshd[7376]: pam_unix(sshd:session): session closed for
user root
```
Since you also confirmed it works as expected I'm now merging it. Thanks!
Please note: the PR is against 4.5, we also need to get this to master..
> Allow non-root credentials for adding KVM hypervisor
> ----------------------------------------------------
>
> Key: CLOUDSTACK-8339
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8339
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: KVM
> Affects Versions: 4.5.0
> Reporter: Marcus Sorensen
> Assignee: Rohit Yadav
> Fix For: 4.6.0, 4.5.2
>
>
> Users prefer to not provide root ssh just to run the hypervisor add from the
> UI. Testing a fix.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)