Nextcloud can't come in because two cars in have email & mail doesn't come

hello everyone says in the round has someone already had something like that, since i have built in security, i have not been able to access my cloud for a few days even when i was in the clinic. because that’s always written there. Has anyone ever had the problem

Hi, did you add two-factor authentication and also tick ‘Enforce two-factor authentication’ ?

Maybe this post on the Nextcloud forum can help you to keep 2FA enabled, but not enforced:

  • access Yunohost via SSH
  • open /var/www/nextcloud/config/config.php
  • there woud be a setting ‘twofactor_enforced => true’, make it ‘twofactor_enforced => false’. Maybe add the setting if it is not there (mine is not enabled, so the setting is not there)
1 Like

I made the whole of mine active, because I always got an email beforehand with a code that I came in. that always worked the whole time. not for two days. could you send me the link? because I still got something to get in. but I don’t know where to put it
her mey link
https://apps.nextcloud.com/apps/twofactor_admin
but I don’t know where to put the program and have to make it work and where I can find my nextcloud for the program in yunohost via ssh.
maybe you could give me a tip where all the programs can be found
grafik

The screenshot shows the home directory. Most of the Nextcloud program files are in /var/www/nextcloud/,

# cd /var/www/nextcloud/
# ls 
3rdparty  console.php  index.html  ocm-provider  remote.php  themes
apps      COPYING      index.php   ocs           resources   updater
AUTHORS   core         lib         ocs-provider  robots.txt  version.php
config    cron.php     occ         public.php    status.php
# cd config
# ls 
config.php  config.sample.php
# pwd 
/var/www/nextcloud/config

There is the config.php file.

The occ-program/interface that is often referred to, is in the /var/www/nextcloud-directory, you’d use it like

# sudo -u nextcloud php /var/www/nextcloud/occ app:list

(or another command than ‘list’ )
Mine used to work but gives an error now :frowning: (though Nextcloud seems to run fine), you’ll have to check the exact name of the app you want to install via the app:list command. The documentation makes me guess it would be something like

# sudo -u nextcloud php /var/www/nextcloud/occ app:install twofactor_admin

I’d start with disabling 2FA enforcement, if that does not let you log in, remove 2FA altogether so that you are able to log in again. Once you can log in, you can start troubleshooting easier.

1 Like

thanks

it doesn’t seem to be installed for me or doesn’t exist at all. and from the left side you will be redirected to the netxcloud page, but which version do i actually have to install and how do i proceed? thank you for your great support.


Bummer… You get exactly the same error as I get :frowning: It used to work on Nexctloud 18, but I did not use the command anymore since upgrading to Nextcloud 22. There are more mentions on the web about ACPu, but I don’t know how to configure it for nginx/nextcloud.

So, situation and options for installing twofactor-admin at the moment:

  • you can not log in via web
    • no options here
  • you can log in via CLI,
    • but occ is broken → no options

Options to do use Nextcloud and log in:

  • log in via CLI
  • open /var/www/nextcloud/config/config.php for editing
  • set ‘twofactor_enforced => false’ in that file
  • maybe restart nginx
  • log in to Nextcloud via the web interface
  • add twofactor-admin via the web interface
  • try enabling/enforcing 2FA again
1 Like

I don’t get that called up by termil. could you give me the order of command here. the second question i ask myself is ngnix not unstable? thank you for your support. but how do I go about installing that.Thanks mey Friend

Momentan sollten Sie nichts installieren. Entfernen Sie zuerst die 2-Faktor-Autorisierung, dass heist, aendern Sie in config.php twofactor_enforced => false’.

Versuchen Sie dann über das Web die twofactor-admin zu installieren.

$ sudo vi /var/www/nextcloud/config/config.php
# oder nano, wass nutzen Sie zum tekstedit?

Suchen Sie im Text nach der Satz ‘twofactor_enforced => true’ und aenderen Sie es zu ‘twofactor_enforced => false’

Dass soll genugen Sie wieder die Web interface benutzen zu lassen!

1 Like

GVim nutze ich

aim not go ain have |I’ve already been in there, just what do I throw out or which version do I have to add? by the way it works with me under sudo vi||
| — | — |
||
||
||
||
grafik

While trying to create you a screenshot for the configuration, I accidentally repaired OCC :stuck_out_tongue:
Now my OCC works!

This is how to do it:

  • $ sudo vi /var/www/nextcloud/config/config.php
  • look for the line: 'memcache.local' => '\\OC\\Memcache\\APCu',
  • change to: 'memcache.local' => '\\OC\\Memcache\\Redis',
  • save & exit
  • now try sudo -u nextcloud php /var/www/nextcloud/occ app:list
  • success? Then sudo -u nextcloud php /var/www/nextcloud/occ app:install twofactor_admin

I got exactly the same version, 22.2.3.0. If you can’t use OCC after changing APCu → Redis like above,

...then...

look for this bit of text in config.php:

'twofactor_enforced' => 'true',
'twofactor_enforced_groups' =>
array (
),
'twofactor_enforced_excluded_groups' =>
array (
),

and change it to

'twofactor_enforced' => 'false',
//'twofactor_enforced_groups' =>
//array (
//),
//'twofactor_enforced_excluded_groups' =>
//array (
//),
1 Like

[quote=“wbk, post:11, topic:18406”]
php
[/quote] This is how to do it:oder aim have
grafik

$ sudo vi /var/www/nextcloud/config/config.php
look for the line: 'memcache.local' => '\\OC\\Memcache\\APCu',
change to: 'memcache.local' => '\\OC\\Memcache\\Redis', 

So according to your way it should work for me the same way, but unfortunately that is not the case as can be seen in the small screenshot. and the second to config.php is completely empty. should I put that there?


Thanks for ihre help

No, not 'memcache.locking', but 'memcache.local', have another look at the config file.

I think you did nano config.php, instead of sudo nano /var/www/nextcloud/config/config.php

1 Like

Thank you, I found what you told me, but you can’t change it and save it. I will stop soon. so and so do not understand how you can build such a crap or why that happened in the first place.
it cannot be saved in the terminal. or should I have done something wrong when saving. but since the change cannot be saved. I wonder why this had to happen to you and me anyway. this is a disaster

Great! We’re getting close now :wink:

You quote a sudo vi... command, but you show a Nano-screenshot, while you write that you use GVim.
What is the message from Vi or Nano when you try to save it?

Two causes I can imagine:

  • not using sudo (regular users are not allowed to change the file)
  • the filesystem is mounted read-only (that can be the result of a prior error)

Don’t give up; carefully check that you follow the suggestions and when there is an error, carefully describe the error. We can not see your screen after all!

1 Like

[quote=“wbk, post:15, topic:18406, full:true”]

Great! We’re getting close now :wink:

You quote a sudo vi... command, but you show a Nano-screenshot, while you write that you use GVim.
What is the message from Vi or Nano when you try to save it?

Two causes I can imagine:

  • not using sudo (regular users are not allowed to change the file)
  • the filesystem is mounted read-only (that can be the result of a prior error)

Don’t give up; carefully check that you follow the suggestions and when there is an error, carefully describe the error. We can not see your screen after all!
[/quote] thank you for helping me so well. for that you deserve a big cup of coffee from me. need to hang up a coffee donation box in your profile. no my problem i come in but i try to change it and save it but i don’t succeed. the terminal does not react as usual. it is even worse than installing gz files. i was a truck driver for many years and had my small company. the same accident as Schumacher one day later. it happened to me with the bike. i have always been interested in software and hardware and tried my hand at it. but there are always new things coming, like now here in the terminal. And now I see that as I can’t just save my data like with the nano and get out of the plane. my goodness is that complicated this morning. I am glad that you are still there. thick coffee follows.

grafik

1 Like

Ah, that explains! Vi can be handy, but you need the ‘user manual’ :stuck_out_tongue:

So, Vi got 2 modes:

  • command mode (you are not used to this)
  • entry mode (for ‘normal’ typing)

Whet Vi starts, it is in command mode. Nothing works. Press ‘i’ on the keyboard to ‘insert’ text. Now you can type letters and use delete and backspace. Don’t use arrow keys for up/down, that does not work now.
To move up or down, pres escape on the keyboard, and move up or down where you want to go, and then ‘i’ again to insert text.
(It can be done easier, but with more different commands; this is the easiest to explain :stuck_out_tongue_winking_eye: )
Saving is another command again. Press ‘escape’ on the keyboard, then ‘:’ (the cursor will move to the bottom of the screen and show ‘:’ there), then pres ‘x’ on the keyboard (x is short for save+close)

So, to make a copy of the file, edit the file and save it:

  • sudo cp /var/www/nextcloud/config/config.php /var/www/nextcloud/config/config.php.bak
  • sudo vi /var/www/nextcloud/config/config.php
  • Search the line where it says 'memcache.local' => '\\OC\\Memcache\\APCu',
  • Move the cursor on A from APCu
  • Press ‘x’ on your keyboard 4 times (x means ‘delete’ in command mode)
  • Now press ‘i’ on your keyboard. Vi switches to entry mode, now you can type text.
  • Type Redis
  • Press escape on the keyboard (Vi switches to command mode, you can not type text anymore)
  • Press ‘:’ on the keyboard (the cursor moves to the bottom, shows ‘:’)
  • Press ‘x’ on the keyboard (Vi closes)

Done! Now run the OCC-command,

sudo -u nextcloud php /var/www/nextcloud/occ app:list
sudo -u nextcloud php /var/www/nextcloud/occ app:install twofactor_admin

What about that?

1 Like

oh thanks the system writes to me delet i can only speak a few letters in english. that’s why I asked why you heard. Please excuse. I always have problems with the forum. sometimes I could help some myself but somehow I don’t know how to make that understandable to the other. because I’ve been with yunohost for a long time and love it. Even after my accident a day later, like Schumacher, with me on my bike and a long coma, that helped me and a lot of software. but I will never get warm with English. you also get some money from me every month, as much as i can, because you did a really great thing with yunohost. I thank you and don’t want to hurt you. but as I already wrote, it was deleted with me. thank you again for your help.

I switched it off first with which I no longer came in

Ich habe sie erstmal abgeschaltet womit ich nicht mehr rein kahm
oh thanks the system writes to me delet i can only speak a few letters in english. that’s why I asked why you heard. Please excuse. I always have problems with the forum. sometimes I could help some myself but somehow I don’t know how to make that understandable to the other. because I’ve been with yunohost for a long time and love it. Even after my accident a day later, like Schumacher, with me on my bike and a long coma, that helped me and a lot of software. but I will never get warm with English. you also get some money from me every month, as much as i can, because you did a really great thing with yunohost. I thank you and don’t want to hurt you. but as I already wrote, it was deleted with me. thank you again for your help.

@wbk |please see for yourself I came in. do you know how via my linux phone. why am I only answering now. because at mikr a friend is sick. but not on corona. you can see that in the picture. purely via my browser from my handset and switched off for the time being.! I’m lucky your path is definitely the best described path. but I still hadn’t quite understood how the vi was handled. say you could help me how to build a new but compatible one. how are you doing everything healthy about them? I hope so||
| — | — |
||
||
||
||

1 Like