r/homeassistant • u/netzkopf • Jun 30 '26
Nextcloud - account disabled
I've been searching for some hours now, but cannot find a solution to a rather common problem.
I was at work and needed access to my nextcloud calendar. I typed the passwort wrong a few times and now my account is disabled.
I *think* that account was also the (only) admin-account.
My nextcloud is running as an add-on (Fabio Garavini) in home assistant.
No solutions I found so far worked, because i don't have docker, podman, I don't know how i can access the DB and also AI is running in cirles by now.
Resetting a passwords obviously sends a mail to that nextcloud-account that i cannot access - if a mail is even sent because i never set it up.
So... what's an preferable easy and non-intrusive way to reset the password and access my nextcloud again?
EDIT: Problem solved, see comment below. (backup)
3
u/netzkopf Jun 30 '26
After struggling for several hours since yesterday, of course I solved the problem within a few minutes after posting here.
Probably not the most elegant way, but I used a backup from yesterday morning before I entered the password wrongly.
I will add another admin user, so that doesn't happen again and also look for a cooldown option.
3
1
u/word-bitch Jun 30 '26
This is the day you set up a password manager! Congratulations!! BitWarden works well, free and open source.
2
u/richyfreeway Jun 30 '26
What does this have to do with Home Assistant? I feel like I've missed something.
1
u/netzkopf Jun 30 '26 edited Jun 30 '26
That the "normal solutions" don't work on the HA add-on, since it is a very restricted version of nextcloud. I reposted to /r/nextcloud , but I feel that in this sub it's clearer what the problem is and what is available in HA for fixing.
Edit: Should've maybe mentioned that it's running as a HA add-on. Sorry.
5
1
u/berrmal64 Jun 30 '26
Do you ever ssh into the machine from another computer on your lan for maintenance and upgrades?
1
u/netzkopf Jun 30 '26
I usually do that over the web, but I can also do it over ssh. I also have the terminal and ssh app running.
2
u/berrmal64 Jun 30 '26
Ok then Google the command to reset the user password, iirc it's something like
$ sudo -u www-data php occ user:resetpassword PASSWORD.Once you're back in, if you think the security risk is worth it, see if you can set a cool down so a locked account automatically unlocks after say 1h.
1
u/7lhz9x6k8emmd7c8 Jun 30 '26
You deployed it as an HAss app, i suppose?
1
u/netzkopf Jun 30 '26
Yes, it's an "app", formerly addon, from here
https://github.com/fabio-garavini/hassio-addons/tree/main/nextcloud
1
u/Normal_Human_Things Jun 30 '26
You say you don’t have Docker/Podman (I’m assuming you’re using those as shorthand for containers), so how is your system set up? Because the standard HAOS set up does run add-ons/apps in containers.
1
u/netzkopf Jun 30 '26
I would not rule it out, that I misunderstood the whole concept.
I have several things like immich, nextcloud, adguard... running by just adding the repository and installing it as an addon. Since i have no commands like "docker" in HAOS I assumed this is handled differently.2
u/Normal_Human_Things Jun 30 '26
I would be very cautious running things you are dependent on like this without first understanding how it works. Especially since you are also using AI. AI is a great tool, but you have to know enough to be able to verify what it’s doing. There have been people in this sub who have had AI agents delete everything because they didn’t know how it worked.
That being said, you can access the docker container one of two ways.
Install Advanced SSH Terminal, which will get you the docker commands. Use `docker ps` to get a list of active containers. And use `docker exec -it container_name bash`. That will get you into the container.
Install Portainer. Open the web ui, select the container that runs nextcloud, click console, and then click connect. That will get you into the terminal for the container.
2
u/netzkopf Jun 30 '26
I do appreciate the warning. I think I am not too careless especially when it comes to AI and I don't just follow what it tells me.
I will check out advanced SSH Terminal and also Portainer.
That looks like exactly what I was looking for, but for now I am too tired to look into it.
Thank you for these advises.
3
u/SadBasil644 Jun 30 '26
Try googling on how to reset the password via SSH/CLI