diff options
Diffstat (limited to 'password-model.lua')
-rw-r--r-- | password-model.lua | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/password-model.lua b/password-model.lua index e4dfb22..376c0e2 100644 --- a/password-model.lua +++ b/password-model.lua @@ -4,21 +4,8 @@ require "format" -- no initializer in model - use controller.init for that -get = function (self) ---hardcoded for root now - f = format.search_for_lines("/etc/shadow", "root:") - temp = format.string_to_table(f,":") - if temp[2] == "!" then - status = "not set" - else - status = "set" - end - f:close() - return (cfe{value=status, name="password"}) -end - --setup so that it will compare password input -set = function (self, cmd1, cmd2) +set = function (self, userid, cmd1, cmd2) if cmd1 ~= cmd2 then report = "Invalid or non matching password. Try again" else command = "/usr/bin/cryptpw" .. " " .. cmd1 |