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" +
|
bashscript := "#!/bin/bash \n" +
|
||||||
"# Path: /var/publapi/users/.sh\n" +
|
"# Path: /var/publapi/users/.sh\n" +
|
||||||
"# This file is generated by publapi. Do not edit this file.\n" +
|
"# This file is generated by publapi. Do not edit this file.\n" +
|
||||||
"useradd -m -s /bin/bash " + username + "\n" +
|
"useradd -Um -s /bin/bash " + username + "\n" +
|
||||||
"echo " + username + " created!"
|
"printf \"%s\n%s\n\" \"" + pass + " " + pass + " | passwd " + username +
|
||||||
|
"echo " + username + "'s account has been created!"
|
||||||
|
|
||||||
fmt.Println(bashscript)
|
fmt.Println(bashscript)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user