tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: Command line re-enabling of disabled user accounts under
@ 2000-11-16  6:58 Williams, David J
  0 siblings, 0 replies; only message in thread
From: Williams, David J @ 2000-11-16  6:58 UTC (permalink / raw)
  To: tru64-unix-managers

Thanks to Colin Walters and Hoai Tran for responding.

Colin  wrote:

	David,

	Take a look at the sysman_cli, which enables you to
	write scripts that use the Sysman Accounts utilities.

	There are sample scripts provided on the system,
	referenced in the sysman_cli.8 reference page.

	You should be able to use it to return and test
	any account attribute.

	Regards,

	Colin

	Colin Walters
	Compaq UNIX Business Segment - Tru64 UNIX Publications Group
	System Administration Documentation
	Nashua, NH USA Tel: 603-884-0440
	http:\\www.zk3.dec.com\~walters (firewalled)
	ONLINE DOCUMENTATION AT:
	http://www.unix.digital.com/faqs/publications/pub_page/doc_list.html
	See our new Best Practices

Hoai Tran wrote:

	Try this

	edauth -g username | sed 's/chkent:/u_lock@:chkent:/' | edauth -s

	Hope this helps

	Hoai

	HTran@freightcorp.com.au

----------------------------------------------------------------------------
----

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@au.faulding.com
http:www.faulding.com
 

> -----Original Message-----
> From:	Williams, David J 
> Sent:	Wednesday, 15 November 2000 17:43
> To:	'tru64-unix-managers@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@au.faulding.com
> http:www.faulding.com
>  
> 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-11-16  6:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-16  6:58 SUMMARY: Command line re-enabling of disabled user accounts under Williams, David J

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox