# add adminuser via web-cyradm

## benjamin200

Hello,

I used web-cyradm to manage my domain. If I add an second adminuser, give them a password and logout, try to login with the new adminuser, the login failed. Further I recognise  that also the password change-method via web-interface doesn't work correct. After changing the passwort, I could never login. Have anyone get luck with this, or see the them issue?

I used the original web-cyradm and the gentoo ebuild (not in portage). 

But with both version same error.

Thanks,

Benjamin

----------

## benjamin200

DUMP  :Smile: 

any suggestion? Does anyone see the same effect which occurs if I add a superuser at cyradm?

Thx,

Benjamin

----------

## Guybrush

Hi benjamin200,

I am evaluating web-cyradm at the moment and I think that you are using version 0.5.4 or 0.5.4-1 of web-cyradm.

You cannot login, because the software forgets to insert a value in the domainadmin database if you change a superuser or insert a new superuser.

To cope with the add another superuser thing, simply change the following line in newadminuser.php

old line 180:

```
 if ( $newadmintype==0 AND !empty($newdomain)){
```

new line 180:

```
 if ($newadmintype==0 AND empty($newdomain)){
```

Because you leave the "Domain"-Field blank when adding a superuser.

The second problem with not being able to log in after a password change is in the file editadminuser.php. Here all entries with your entered username first get deleted from the table domainadmin (see line 200) and then no new entries are inserted into that table. Bit I couldn't figure out how to fix this, but it seems to be already fixed in the cvs version of web-cyradm. As a workaround, you can manually insert the needed value in mysql yourself. Just connect to your mysql-server and commit the following SQL-statements:

```
use mail

insert into domainadmin (domain_name, adminuser) VALUES ('*', 'your_username_with_changed_pw_here');

quit
```

I hope this helps you a little bit.

Keep waiting for the upcoming release 0.5.5 because a lot of things seem to be fixed there.

----------

## benjamin200

 *Quote:*   

> 
> 
> Hi benjamin200, 
> 
> I am evaluating web-cyradm at the moment and I think that you are using version 0.5.4 or 0.5.4-1 of web-cyradm. 
> ...

 

Hi Guybrush

many tanks for the trick's. I will try it today and let you know the result.

 *Quote:*   

> 
> 
> Keep waiting for the upcoming release 0.5.5 because a lot of things seem to be fixed there.
> 
> 

 

Hope this BUGs are fixed in the next Release. What Version do you prefer - the original soucre form developer or the Gentoo ebuild?

```

*  net-mail/web-cyradm

      Latest version available: 0.5.4.1

      Latest version installed: 0.5.4.1

      Size of downloaded files: 445 kB

      Homepage:    http://www.web-cyradm.org/

      Description: Web-based that glues topnotch mailing technologies like cyrus-imap and postfix together.

      License:     GPL-2

```

Thanks,

Benajmin

----------

## Guybrush

Hi benjamin200,

I prefer version 0.5.4 from the original website. Haven' t tried an ebuild yet (I cannot find an ebuild in the portage tree). Maybe I give the CVS-version a try.  If so, I will post my experience here.

BTW could you post where I can find an ebuild for web-cyradm???

CU  :Very Happy: 

----------

## benjamin200

I can't find the line

```

if ( $newadmintype==0 AND !empty($newdomain)){

```

 *Quote:*   

> 
> 
> BTW could you post where I can find an ebuild for web-cyradm??? 
> 
> 

 

sure, thats an inoffical ebuild. Sorry I don't remember the link, but I can send you the ebuild as a tar file by mail. Please contact me by Private Message.

Thanks,

Benjamin

----------

## Guybrush

Hi,

it is in the file 

```
newadminuser.php
```

located in the top level directory of your web-cyradm installation in line 180.

And sorry, just had a little typo in my post. The line to edit looks like:

```
if ($newadmintype==0 AND !empty($newdomain)){
```

But you can find this line very easily by editing the newadminuser.php-file with vim (vim newadminuser.php) and then enter

:180 in vim

Greets

PS Already found the inofficial ebuild on https://bugs.gentoo.org/show_bug.cgi?id=65318

----------

## benjamin200

 *Quote:*   

> 
> 
> Hi,
> 
> it is in the file
> ...

 

Thank you, I will try it and let you know the result.

Thx,

Benjamin

----------

## Guybrush

Hi,

if my tip doesn't work, you could also have a look at the web-cyradm mailing lists. 

You can find them under http://www.web-cyradm.org/pipermail/web-cyradm/

or via Google-Search "site:web-cyradm.org <<problem>>"

CU  :Cool: 

----------

## Evildad

Just wanted to say, that your tip worked for me Guybrush   :Very Happy: 

A little late but that's for the future   :Cool: 

----------

