Changing User Passwords from Command Line

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

IgnoranceIsBliss

Changing User Passwords from Command Line

Postby IgnoranceIsBliss » Sun Sep 09, 2007 11:55 pm

Is there a command-line method for an Administrator to change a user password? I've searched through the forums and the administration guide, and I simply can't find a suitable, simple command to do so.

Eventually the passwords will be linked to OpenLDAP...but for now, I need to be able to issue a command-line command.

grahamk
Posts: 134
Joined: Fri Mar 02, 2007 4:53 am

Postby grahamk » Mon Sep 10, 2007 1:52 am

ommodu 'username' -p newpassword

to unset a password (probably need to do it when you migrate to openldap):

ommodu 'username' -p ''

IgnoranceIsBliss

Thanks

Postby IgnoranceIsBliss » Mon Sep 10, 2007 2:04 am

Thanks for that! I thought it would be ommodu, but I couldn't seem to find the -p option, and was shocked that it wasn't mentioned in the administration guide - nor anywhere where it could be easily found with Google.

Guess I need to narrow down my search criteria :)

Thanks again!

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Tue Sep 11, 2007 4:58 am

I suggest you do a

man scalix-server

to see a breakdown of commands by function. You can then do a

man commandname

to get a full manual for each of them.

William
Posts: 314
Joined: Fri Jun 02, 2006 8:28 am
Location: British Isles

Postby William » Tue Sep 11, 2007 6:43 am

or try this script to get the man pages into html

Code: Select all

#!/bin/sh

# scalix man page convertion.
sourcedir="/opt/scalix/share/man/"
exportpath="/path_to/Scalix_man_pages/"
exportdir="html"
rm -f $exportpath$exportdir/index.html
touch $exportpath$exportdir/index.html
echo "<html><title>Scalix Man pages</title><body><table>" >> $exportpath$exportdir/index.html

cd $sourcedir
for MANFOLDERS in `ls -1`
do
   cd $sourcedir$MANFOLDERS
   for MANPAGES in `ls -1`
   do
      filename=`echo "${MANPAGES}" | sed "s/.gz*$//" | sed "s/\..$//"`
      detail=`man -k $filename`
      filename2=`echo "${MANPAGES}" | sed "s/.gz*$//"`
      hyperlink="<tr><td valign=top><a href='$filename2.html'>$filename</a></td><td>$detail <br></td></tr>"
      echo $hyperlink >> $exportpath$exportdir/index.html
      gzip -dc $sourcedir/$MANFOLDERS/$MANPAGES | man2html -r | sed -e "s/man./$exportdir/g" |  sed -e "s@index.html@$exportdir/index.html@g" | sed -n -e :a -e '1,6!{P;N;D;};N;ba' > $exportpath$exportdir/$filename2.html
      echo "</body></html>">>$exportpath$exportdir/$filename2.html
      echo $MANPAGES " - " $filename " - converted"
   done
done
echo "</table></body></html>" >> $exportpath$exportdir/index.html
htmldoc --continuous -f $exportpath$exportdir/Scalix_Man_Pages.pdf $exportpath$exportdir/*.html


Multiple fixes. Seems to work now.
Added command to output to PDF.

htmldoc can be downloaded from here for REDHAT el4:
http://rpm.pbone.net/index.php3/stat/4/ ... 6.rpm.html
for some reason the 'sources' from htmldoc.org are not sources at all.

Here is the output:
http://files-upload.com/files/495976/sc ... _pages.pdf
Last edited by William on Tue Sep 11, 2007 11:53 am, edited 5 times in total.

jaime.pinto
Scalix Star
Scalix Star
Posts: 709
Joined: Fri Feb 23, 2007 6:50 pm
Location: Toronto - Canada

Postby jaime.pinto » Tue Sep 11, 2007 7:47 am

man2html $MANPAGES > $exportdir/$filename.html
Nice script. I had to cleanup the index.html a bit.
Image Jaime
||||||||||||||||||||||||||||||||||||||||

William
Posts: 314
Joined: Fri Jun 02, 2006 8:28 am
Location: British Isles

Postby William » Tue Sep 11, 2007 12:12 pm



Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 5 guests