How to login mailinabox/nextcloud admin

Can anyone tell me how to login box.mailinabox/cloud with admin? I tried logging as admin but won’t accept my admin logging details when setup mail-in-a-box.
I can only login as a user. I am using mail-in-a-box v0.53

I will welcome your opinion

I am not a user of Nextcloud, but I was just able to use my MiaB admin user to log into the interface, no problem. Is that what you are looking for?

You need to enable admin on Nextcloud first. Then you will be able to login as an admin user.

To enable, you need to run a script on the command line of your MIAB server, run as the non-privileged user you installed MIAB as.

“sudo mailinabox/tools/owncloud-unlockadmin.sh admin@example.com

The script is called owncloud but it works here. Nextcloud is a fork.

1 Like

Thanks for the info. I will try it

The script in question is called owncloud-unlockadmin.sh but as noted below, this is an unsupported modification:

1 Like

Maybe its my imagination or just my paranoia, but Nextcloud has always seemed like the potential security hole I don’t desire in a mail server. I understand Nextcloud to have a lot of functionality maybe not immediately available in the MiaB configuration, but it might be worth considering whether to enoy that functionality on a different server.

Yes, a good question of course. Nextcloud in MIAB is limited to Calendar, Contacts and Files (WebDAV). Nevertheless, it does increase the attack surface I suppose.

I have tried all the suggestions and this is the errors I got:

root@box:~/mailinabox# /bin/bash
root@box:~/mailinabox# source /etc/mailinabox.conf
root@box:~/mailinabox# ADMIN=$(./mail.py user admins | head -n 1)
bash: ./mail.py: No such file or directory
root@box:~/mailinabox# est -z "$1" || ADMIN=$1

Command 'est' not found, did you mean:

  command 'esd' from deb pulseaudio-esound-compat
  command 'tst' from deb pvm-examples
  command 'ent' from deb ent
  command 'ast' from deb jruby
  command 'eet' from deb libeet-bin
  command 'gst' from deb gnu-smalltalk
  command 'rst' from deb bro-aux
  command 'esi' from deb atm-tools
  command 'test' from deb coreutils

Try: apt install <deb name>

root@box:~/mailinabox# source /etc/mailinabox.conf
root@box:~/mailinabox# ./mail.py user admins | head -n 1
bash: ./mail.py: No such file or directory
root@box:~/mailinabox# ./mail.py user admins
bash: ./mail.py: No such file or directory
root@box:~/mailinabox# (./mail.py user admins | head -n 1)
bash: ./mail.py: No such file or directory
root@box:~/mailinabox# sudo -u www-data php /usr/local/lib/owncloud/occ group:adduser admin


  Not enough arguments (missing: "user").


group:adduser <group> <user>

root@box:~/mailinabox# sudo mailinabox/tools/owntcloud-unlockadmin.sh admin@turvyhost.com
sudo: mailinabox/tools/owntcloud-unlockadmin.sh: command not found

Any suggesting?

Can you please highlight the text that is directly from terminal and click the </> icon to convert it to code formatting?

I don’t quit understand your meaning

There is a typo in the command:

sudo mailinabox/tools/owntcloud-unlockadmin.sh

owncloud

Does the account admin@turvyhost.com exist or did you use a different email address when you set up the box? If so, that is what you should use.

1 Like

yes the account exist

I have just made an edit to your post that I think is your copy-paste from the terminal.

Are you running as root? You should run as the non-privileged user you installed as I think. Though I’m not sure that is the problem here.

yes I am running as root

Yes I have corrected the typo and still it is the same error

What is the output of:

ll mailinabox/tools/owncloud-unlockadmin.sh

root@box:~# ll mailinabox/tools/owncloud-unlockadmin.sh
-rwxr-xr-x 1 root root 763 Apr 29 23:20 mailinabox/tools/owncloud-unlockadmin.sh*

I am not clear how the above error is what you are currently getting with the output of ll if you have the corrected the typo.

I have no idea either