2017-09-14 15:15:08 +10:00
|
|
|
local tA = {...}
|
|
|
|
local s=os.gensalt(16)
|
2017-10-08 00:24:42 +11:00
|
|
|
tA[1] = tA[1] or os.getuid()
|
2017-09-14 15:15:08 +10:00
|
|
|
io.write("New password for "..tA[1]..": ")
|
2017-10-08 00:24:42 +11:00
|
|
|
os.setuattr(tA[1],"hpass",sha.sha256(io.read("*")..s))
|
|
|
|
os.setuattr(tA[1],"salt",s)
|