blob: e2d9395d679de7a3c2ca54cadf74645cf9b2c6d5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/usr/libexec/flua
local n = require("nuage")
local pw = {}
pw.name = "foo"
pw.plain_text_passwd = "bar"
local res = n.adduser(pw)
if not res then
n.err("valid user should return a path")
end
local pw2 = {}
pw2.name = "foocrypted"
-- barcrypted
pw2.passwd = "$6$ZY8faYcEfyoEZnNX$FuAZA2SKhIfYLebhEtbmjptQNrenr6mJhji35Ru.zqdaa6G/gkKiHoQuh0vYZTKrjaykyohR8W4Q5ZF56yt8u1"
res = n.adduser(pw2)
if not res then
n.err("valid user should return a path")
end
|