----
What I ended up doing was addressing each of the three reasons in turn.
Using usermod and edauth I found I could modify each of the relevant authcap
database fields:
To fix reason 1, I deleted the u_numunsuclog(number of unsuccessful logins)
entry for username using edauth:
/usr/sbin/edauth -g ${username}|sed
"s/:u_numunsuclog#[0-9]*//g"|edauth -s
To fix reason 2, I used usermod:
/usr/sbin/usermod -x administrative_lock_applied=0 ${username}
To fix reason 3, I set the u_succhg(time of last successful password change)
value to the time now, using the C program current_time.c (see below):
/usr/sbin/edauth -g ${username}|sed
"s/:u_succhg#[0-9]*/:u_succhg#`current_time`/g"|edauth -s
current_time.c:
/*--------------------------------------------------------------------------
------*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main()
{
time_t mytime;
mytime = time(NULL);
printf("%ld\n",mytime);
}
/*--------------------------------------------------------------------------
------*/
Regards,
David
David J Williams
Technical Specialist
Information Services
F H Faulding & Co Limited
Tel: +61 8 8408 3450/ Fax: +61 8 8408 3500
mailto:david.j.williams_at_au.faulding.com
http:www.faulding.com
> -----Original Message-----
> From: Williams, David J
> Sent: Wednesday, 15 November 2000 17:43
> To: 'tru64-unix-managers_at_ornl.gov'
> Subject: Command line re-enabling of disabled user accounts under
> Tru64 V5.1
>
> We have several account maintenance scripts that were written under Tru64
> V4.0F, to enable the UNIX account maintenance tasks to be distributed to
> our support group, and run without the GUI, dxaccounts.
>
> The account re-enable script no longer works.
>
> Accounts can become disabled if:
>
> 1 The number of unsuccessful logins exceeds the max number of
> unsuccessful logins setting
>
> 2 The system administrator locks the account
>
> 3 The account lifetime is exceeded
>
> Under V5.1, the /usr/sbin/usermod -x administrative_lock_applied=0
> username only re-enables an account that was locked by the
> administrator(reason 2 above).
>
> This usermod command under V4.0F fixed reasons 1 and 2 and 3.
>
> Does anyone know how else I can script an account re-enable?
>
> Please respond to me directly and I will summarise.
>
> TIA,
>
> David
>
> David J Williams
> Technical Specialist
> Information Services
> F H Faulding & Co Limited
> Tel: +61 8 8408 3450/ Fax: +61 8 8408 3500
> mailto:david.j.williams_at_au.faulding.com
> http:www.faulding.com
>
>
Received on Thu Nov 16 2000 - 07:00:47 NZDT
This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT