Hi
I have enable the two factor admin support in nextcloud snap 15.
Now I have enforce the all users for Totp authentication. but how to generate the authentication code first time for users.
I got this to run for authentication code
./occ twofactorauth:admin:generate-code
But do know how run this in snap nextcloud.
Please guide for the same.
This is a nextcloud question, not a snap question, so in general I’d suggest you ask there.
However, note that the nextcloud snap has an occ
app declared on it, so you should be able to call nextcloud.occ
, and presumably it’d work as you’d expect.
2 Likes
Dear Chipaca,
Thank you for your valuable reply . Is not right to ask agian on nextcloud but if any hint will be on this error may help me to solve the same.
nextcloud.occ twofactorauth:admin:generate-code niraj
In AbstractMySQLDriver.php line 115:
An exception occurred while executing ‘INSERT INTO oc_twofactor_admin_codes
(user_id
, code
, expires
) VALUES(?, ?, ?)’ with params [“niraj”, “152681”, 1554354537]:
SQLSTATE[HY000]: General error: 1364 Field ‘id’ doesn’t have a default value
In PDOStatement.php line 107:
SQLSTATE[HY000]: General error: 1364 Field ‘id’ doesn’t have a default value
In PDOStatement.php line 105:
SQLSTATE[HY000]: General error: 1364 Field ‘id’ doesn’t have a default value