Twofactor: Cant generate a one-time code for User

hello together
i have nextcloud version 19.0.3 and the app “Two-Factor Admin Support” with version 3.0.0 installed on an Ubuntu version LTS.

A user has activated Two-Factor for himself. Now he has a new mobile device and can no longer log in.

According to the support app “Two-Factor Admin Support” I should be able to generate a temporary code via command line with the following command

./occ twofactorauth:admin:generate-code leonida

Unfortunately the command “occ” is invalid. I have already tried some things. Does anyone have any advice for me?

hello @mikelee and welcome to the homeuserforum of NC.

Thanks for your very first contribution.

try executing your command like that

sudo -u <webuser> php occ twofactorauth:admin:generate-code leonida

in your nextcloud-directory… (the directory where you installed NC) where <webuser> is the user all nextcloud files should belong to ls -la would show you

Hi Jimmy
Perfect - thanks for your help!

1 Like