summaryrefslogtreecommitdiffstats
path: root/user_mgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'user_mgr.cpp')
-rw-r--r--user_mgr.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/user_mgr.cpp b/user_mgr.cpp
index f407133..cba9366 100644
--- a/user_mgr.cpp
+++ b/user_mgr.cpp
@@ -456,8 +456,10 @@ UserSSHLists UserMgr::getUserAndSshGrpList()
// Any error, break the loop.
break;
}
- // All users whose UID >= 1000 and < 65534
- if ((pwp->pw_uid >= 1000) && (pwp->pw_uid < 65534))
+ // Add all users whose UID >= 1000 and < 65534
+ // and special UID 0.
+ if ((pwp->pw_uid == 0) ||
+ ((pwp->pw_uid >= 1000) && (pwp->pw_uid < 65534)))
{
std::string userName(pwp->pw_name);
userList.emplace_back(userName);
OpenPOWER on IntegriCloud