Hi List Does anyone know how I can configure it to auomaticly set the username as the first password so the user can change the password on first login? Regards Per Qvindesland
Per Qvindesland wrote:> Hi List > > Does anyone know how I can configure it to auomaticly set the username as > the first password so the user can change the password on first login? > > Regards > Per Qvindesland >There isn''t a configuration option for this. You''d need to change a little bit of code. Off the top of my head I think that in funcs.py in the add_user method add a line like: user[''userpassword''] = user.get(''uid'') You can put this just about anywhere in there, I''d put it around where we check for and set homeDirectory, etc. rob
Hi Thanks for replying, i will try but could you please give me a clue on where I might find this file? Kind regards Per Qvindesland On 2/13/09 10:30 PM, "Rob Crittenden" <rcritten@redhat.com> wrote:> You can put this just about anywhere in there, I''d put it around where > we check for and set homeDirectory, etc.
Per Qvindesland wrote:> Hi > > Thanks for replying, i will try but could you please give me a clue on where > I might find this file? > > Kind regards > Per Qvindesland > > > On 2/13/09 10:30 PM, "Rob Crittenden" <rcritten@redhat.com> wrote: > >> You can put this just about anywhere in there, I''d put it around where >> we check for and set homeDirectory, etc. >I think the change should look something like (untested): diff --git a/ipa-server/xmlrpc-server/funcs.py b/ipa-server/xmlrpc-server/funcs. index cf9e7de..d5bbab2 100644 --- a/ipa-server/xmlrpc-server/funcs.py +++ b/ipa-server/xmlrpc-server/funcs.py @@ -623,6 +623,9 @@ class IPAServer: if user.get(''gn''): del user[''gn''] + if not user.get(''userpassword''): + user[''userpassword''] = user[''uid''] + # some required objectclasses entry.setValues(''objectClass'', (config.get(''ipauserobjectclasses''))) On an installed system this is in /usr/lib/python2.5/site-packages/ipaserver/funcs.py rob
Awesome thanks a million. Regards Per Qvindesland On 2/13/09 11:01 PM, "Rob Crittenden" <rcritten@redhat.com> wrote:> Per Qvindesland wrote: >> Hi >> >> Thanks for replying, i will try but could you please give me a clue on where >> I might find this file? >> >> Kind regards >> Per Qvindesland >> >> >> On 2/13/09 10:30 PM, "Rob Crittenden" <rcritten@redhat.com> wrote: >> >>> You can put this just about anywhere in there, I''d put it around where >>> we check for and set homeDirectory, etc. >> > > I think the change should look something like (untested): > > diff --git a/ipa-server/xmlrpc-server/funcs.py > b/ipa-server/xmlrpc-server/funcs. > index cf9e7de..d5bbab2 100644 > --- a/ipa-server/xmlrpc-server/funcs.py > +++ b/ipa-server/xmlrpc-server/funcs.py > @@ -623,6 +623,9 @@ class IPAServer: > if user.get(''gn''): > del user[''gn''] > > + if not user.get(''userpassword''): > + user[''userpassword''] = user[''uid''] > + > # some required objectclasses > entry.setValues(''objectClass'', > (config.get(''ipauserobjectclasses''))) > > On an installed system this is in > /usr/lib/python2.5/site-packages/ipaserver/funcs.py > > rob > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users
Hi I am finally ready to move on with the implementation of my directory server and I would like to have implemented this solution so that it automatically adds in the username as the default password for all new users, I have been trying to figure out this through this script but it is referring to ipa-server which is not something that I have installed, is there anywhere else or is there any other way of doing this? Regards Per Qvindesland On 2/13/09 11:01 PM, "Rob Crittenden" <rcritten@redhat.com> wrote:> Per Qvindesland wrote: >> Hi >> >> Thanks for replying, i will try but could you please give me a clue on where >> I might find this file? >> >> Kind regards >> Per Qvindesland >> >> >> On 2/13/09 10:30 PM, "Rob Crittenden" <rcritten@redhat.com> wrote: >> >>> You can put this just about anywhere in there, I''d put it around where >>> we check for and set homeDirectory, etc. >> > > I think the change should look something like (untested): > > diff --git a/ipa-server/xmlrpc-server/funcs.py > b/ipa-server/xmlrpc-server/funcs. > index cf9e7de..d5bbab2 100644 > --- a/ipa-server/xmlrpc-server/funcs.py > +++ b/ipa-server/xmlrpc-server/funcs.py > @@ -623,6 +623,9 @@ class IPAServer: > if user.get(''gn''): > del user[''gn''] > > + if not user.get(''userpassword''): > + user[''userpassword''] = user[''uid''] > + > # some required objectclasses > entry.setValues(''objectClass'', > (config.get(''ipauserobjectclasses''))) > > On an installed system this is in > /usr/lib/python2.5/site-packages/ipaserver/funcs.py > > rob > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users