forked from ProjectSegfault/publapi
Add password for the user
This commit is contained in:
parent
2a827841c9
commit
d633ccfb25
@ -41,8 +41,9 @@ func SignupPage(c *fiber.Ctx) error {
|
||||
bashscript := "#!/bin/bash \n" +
|
||||
"# Path: /var/publapi/users/.sh\n" +
|
||||
"# This file is generated by publapi. Do not edit this file.\n" +
|
||||
"useradd -m -s /bin/bash " + username + "\n" +
|
||||
"echo " + username + " created!"
|
||||
"useradd -Um -s /bin/bash " + username + "\n" +
|
||||
"printf \"%s\n%s\n\" \"" + pass + " " + pass + " | passwd " + username +
|
||||
"echo " + username + "'s account has been created!"
|
||||
|
||||
fmt.Println(bashscript)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user