talkincode / toughradius

toughradius provides radius server, tr069 acs
http://www.toughradius.net
GNU General Public License v3.0
560 stars 273 forks source link

Default account and password #150

Open G-Akiraka opened 1 year ago

G-Akiraka commented 1 year ago

The docker deployment is successful. By default, the account and password documents are not written

G-Akiraka commented 1 year ago

admin/toughradius talkincode/toughradius

All the above passwords failed

jamiesun commented 1 year ago

The program always detects the superuser when it starts, if you can't log in, please check if the database connection and initialization are correct.

func (a *Application) checkSuper() {
    var count int64
    a.gormDB.Model(&models.SysOpr{}).Where("username='admin' and level = ?", "super").Count(&count)
    if count == 0 {
        a.gormDB.Create(&models.SysOpr{
            ID:        common.UUIDint64(),
            Realname:  "administrator",
            Mobile:    "0000",
            Email:     "N/A",
            Username:  "admin",
            Password:  common.Sha256HashWithSalt("toughradius", common.SecretSalt),
            Level:     "super",
            Status:    "enabled",
            Remark:    "super",
            LastLogin: time.Now(),
        })
    }
}