Backup user's password?

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

Beaujolais
Posts: 94
Joined: Sun Sep 03, 2006 2:47 pm
Location: Burlington, Ontario

Backup user's password?

Postby Beaujolais » Tue Sep 25, 2007 12:33 pm

Is there a way how to backup and restore user's password?

Occasionally when user's mailbox is corrupted beyond repair I have to delete the user and then re-create it.

But prior I'd like to export user's password (in hashed form is fine) and then restore it later.
Is there a way to do it?

gren
Scalix
Scalix
Posts: 264
Joined: Thu Mar 25, 2004 10:27 am
Contact:

Postby gren » Wed Sep 26, 2007 6:32 am

The encrypted password is stored in the USERLIST directory. Be aware that it can contain strange characters, so you may need to exercise care in changing things.

To find the value of the current password for, say, 'S=gren/OU1=crowley/CN=gren' :
Do :

Code: Select all

omsearch -s -t h -d USERLIST -m UL-PWD -e 'S=gren/OU1=crowley/CN=gren'

For me, this output :

Code: Select all

UL-PWD=$1$vb9UFNoR$GZLuclJgG2UqtdSjI\/VT5\/


I then deleted the user and re-added it. The following command restored the password:

Code: Select all

ommodent -t h -d USERLIST -n 'UL-PWD=$1$vb9UFNoR$GZLuclJgG2UqtdSjI\/VT5\/' -e 'S=gren/OU1=crowley/CN=gren'

Regards,
Gren.

Beaujolais
Posts: 94
Joined: Sun Sep 03, 2006 2:47 pm
Location: Burlington, Ontario

Postby Beaujolais » Mon Oct 01, 2007 6:19 pm

thanks

GodOfTheWired
Posts: 11
Joined: Wed Dec 13, 2006 11:34 am

Postby GodOfTheWired » Fri Nov 02, 2007 7:07 pm

I tried updating an account with an exported password, no such luck.

It seems that ommodent doesn't like $ signs:

[root@webmail ~]# ommodent -t h -d USERLIST -n 'UL-PWD=$1$8fi0glRB$fjj4J12iywoW0mOUecyrY1' -e 'UL-AUTHID=xxxx'
UL-AUTHID=xxxx
[OM 16078] An attribute's value contains invalid characters.

Parameter : Directory Entry Modifier
Attribute : UL-PWD
Max allowed size : 36
Required syntax : IA5-STRING
Value in error : \ufffd1\ufffd8fi0glRB\ufffdfjj4J12iywoW0mOUecyrY1

Any ideas? Is there a way to escape or convert the $ signs so that ommodent takes them?


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 3 guests

cron