Nextcloud,owncloud Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
User avatar
Joulinar
Posts: 2589
Joined: Sat Nov 16, 2019 12:49 am

Re: Nextcloud,owncloud

Post by Joulinar »

Hi basically it's described in this post at NextCloud

https://help.nextcloud.com/t/cannot-del ... nt/67141/2

for DietPi the command would be slightly different:

Code: Select all

ncc user:delete admin
Attention: This does, what it should, it delete’s the user and all the files for userid “admin” without any questions and confirmations. Ensure you have created another user with admin privileges before.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
przemko
Posts: 86
Joined: Sun Mar 15, 2020 5:40 pm

Re: Nextcloud,owncloud

Post by przemko »

This delete all files of admin user? So if I add new user with admin privilages I will keep that files or lost them?
User avatar
Joulinar
Posts: 2589
Joined: Sat Nov 16, 2019 12:49 am

Re: Nextcloud,owncloud

Post by Joulinar »

It will delete all files, setting aso that belongs to this user. If you don't like to delete the user, you can disable it as well

Code: Select all

ncc user:disable admin
But result might be same. I guess as long as the user is disabled, you maybe not able to access files of this user from WebInterface. Probably something you need to test.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
przemko
Posts: 86
Joined: Sun Mar 15, 2020 5:40 pm

Re: Nextcloud,owncloud

Post by przemko »

So I will login as dietpi user and with:

Code: Select all

sudo ncc user:disable admin
disable user. If something goes wrong I will make:

Code: Select all

sudo sudo ncc user:enable admin
? and everything will be OK?

Edit. I go to my /mnt/Toshiba/dietpi_userdata/nextcloud_data and don't see folder with my new user admin name. I see Admin folder and two regular users but not that new admin user. That means new admin share files and folders with old admin user?
User avatar
Joulinar
Posts: 2589
Joined: Sat Nov 16, 2019 12:49 am

Re: Nextcloud,owncloud

Post by Joulinar »

well you can do this as root as well 8)

I guess if you enable the user, it should be available again. BTW you could just run ncc command. There you will see all available options. As this is all NextCloud specific, it might be good to check as well on NextCloud websites. These guys are more specialist on NextCloud questions as we are on this Board 8) The only difference is that on DietPi you can use ncc command instead of occ.

For reference viewtopic.php?p=3026#p3026
You may want to configure your Nextcloud from command line via occ command: Nextcloud admin manual
We added a shortcut to the otherwise necessary 'sudo -u www-data php /var/www/nextcloud/occ':
Just use 'ncc' followed by the desired command inside your terminal.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
przemko
Posts: 86
Joined: Sun Mar 15, 2020 5:40 pm

Re: Nextcloud,owncloud

Post by przemko »

OK, when I login as new admin I don't have any files so I will stay with old one. Thank You very much one more time.
Regards Przemko
Post Reply