# Allow user changes their password in RoundCube webmail

After installed RoundCube for my customer, they asked: user can change their own password

To do this, we have to **enable password plugin** of RoundCube

1. cd plugins/password
    
2. cp config.inc.php.dist config.inc.php
    
3. nano  config.inc.php
    
4. Set $rcmail\_config\['password\_driver'\] = 'sql';
    
5. Save file
    
6. cd ../config
    
7. nano main.inc.php
    
8. Find the line **$rcmail\_config\['plugins'\] = array();** and change to **$rcmail\_config\['plugins'\] = array( 'password');**
    
9. Save file
    

If you finish 9 steps above and access to RoundCube, you will see the Password tab in Settings section. However, you maybe meet the error:

```bash
[1305] FUNCTION xxx_roundcube.update_passwd does not exist (SQL Query: SELECT update_passwd('', '@'))
```

The simplest way is modify **password\_query**:

1. Find  $rcmail\_config\['password\_query'\] in plugins/password/config.inc.php
    
2. Change **$rcmail\_config\['password\_query'\] = 'SELECT update\_passwd(%c, %u)';** to **$rcmail\_config\['password\_query'\] = 'UPDATE zpanel\_postfix.mailbox SET password=CONCAT(\\'{PLAIN-MD5}\\',MD5(%p)) WHERE username=%u AND password=CONCAT(\\'{PLAIN-MD5}\\',MD5(%o)) LIMIT 1';**
    

All done!
