Add password for the user

This commit is contained in:
Arya K 2023-01-07 21:12:28 +05:30 committed by GitHub
parent 2a827841c9
commit d633ccfb25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)