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