Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/libexec/nuageinit/tests/adduser_passwd.lua
35072 views
1
#!/usr/libexec/flua
2
3
local n = require("nuage")
4
5
local pw = {}
6
pw.name = "foo"
7
pw.plain_text_passwd = "bar"
8
local res = n.adduser(pw)
9
if not res then
10
n.err("valid user should return a path")
11
end
12
13
local pw2 = {}
14
pw2.name = "foocrypted"
15
-- barcrypted
16
pw2.passwd = "$6$ZY8faYcEfyoEZnNX$FuAZA2SKhIfYLebhEtbmjptQNrenr6mJhji35Ru.zqdaa6G/gkKiHoQuh0vYZTKrjaykyohR8W4Q5ZF56yt8u1"
17
res = n.adduser(pw2)
18
if not res then
19
n.err("valid user should return a path")
20
end
21
22