git: e82b8378de19 - main - nuageinit: Also add -n to pw usermod and pw groupshow
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 20 Nov 2026 13:47:36 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=e82b8378de196df38c5de40ec65d6b5f99e2b5e6
commit e82b8378de196df38c5de40ec65d6b5f99e2b5e6
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-11-19 15:50:31 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-11-20 13:47:24 +0000
nuageinit: Also add -n to pw usermod and pw groupshow
Commit 7e11a18e74ba ("nuageinit: Use -n with pw usershow") fixed a bug
wtih `pw usershow` and numeric user names. Fix the smae issue with
`pw usermod` and `pw groupshow`.
Reported by: llm-postcr
Reviewed by: bapt
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61761
---
libexec/nuageinit/nuage.lua | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua
index c69155b0aae7..df8fb3223946 100644
--- a/libexec/nuageinit/nuage.lua
+++ b/libexec/nuageinit/nuage.lua
@@ -420,7 +420,7 @@ local function addgroup(grp)
if root then
cmd = cmd .. "-R " .. root .. " "
end
- local f = io.popen(cmd .. " groupshow " .. shell_escape(grp.name) .. " 2> /dev/null")
+ local f = io.popen(cmd .. " groupshow -n " .. shell_escape(grp.name) .. " 2> /dev/null")
local grpstr = f:read("*a")
f:close()
if grpstr:len() ~= 0 then
@@ -673,7 +673,7 @@ local function exec_change_password(user, password, type, expire)
postcmd = " -w random"
end
end
- cmd = cmd .. "usermod " .. shell_escape(user) .. postcmd
+ cmd = cmd .. "usermod -n " .. shell_escape(user) .. postcmd
if expire then
cmd = cmd .. " -p 1"
else