Lines Matching refs:pwd
70 local function adduser(pwd)
71 if (type(pwd) ~= "table") then
80 local f = io.popen(cmd .. " usershow " ..pwd.name .. " -7 2>/dev/null")
86 if not pwd.gecos then
87 pwd.gecos = pwd.name .. " User"
89 if not pwd.home then
90 pwd.home = "/home/" .. pwd.name
93 if pwd.groups then
94 local list = splitlist(pwd.groups)
99 if pwd.primary_group and pwd.primary_group ~= pwd.name then
100 extraargs = extraargs .. " -g " .. pwd.primary_group
102 if not pwd.no_create_home then
105 if not pwd.shell then
106 pwd.shell = "/bin/sh"
110 if pwd.passwd then
111 precmd = "echo "..pwd.passwd .. "| "
113 elseif pwd.plain_text_passwd then
114 precmd = "echo "..pwd.plain_text_passwd .. "| "
121 cmd = cmd .. "useradd -n ".. pwd.name .. " -M 0755 -w none "
122 cmd = cmd .. extraargs .. " -c '".. pwd.gecos
123 cmd = cmd .. "' -d '" .. pwd.home .. "' -s "..pwd.shell .. postcmd
127 warnmsg("nuageinit: fail to add user "..pwd.name);
131 if pwd.locked then
136 cmd = cmd .. "lock " .. pwd.name
139 return pwd.home