Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
Security Level: Public (Anyone can view this level - this is the default.)
-
None
Description
Fix a case where a user 'ro' or 'roo' exists on the system or other variants, like 'cen' and 'centos'.
If one sets user=roo, this will return two directories (/root /home/roo) and then it will fail.
Also, if user 'ro' or 'roo' does not exist, this will happily put the sshkey to the authorized_keys of the root account, which is not the intended place.
As another slightly less improbable example, if we have two users in our company named lars, then we could end up with lars's sshkey in larsb's authorized_keys.
The binary getent should be available on most Linux platforms, including ones using uClibc.
Pull Request on Github, see external URL.