tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "Williams, David J" <David.J.Williams () au ! faulding ! com>
To: tru64-unix-managers
Subject: SUMMARY: Command line re-enabling of disabled user accounts under
Date: Thu, 16 Nov 2000 06:58:26 +0000	[thread overview]
Message-ID: <97435790608618.tru64-unix-managers.marc@archive.invalid> (raw)

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
>  
> 

                 reply	other threads:[~2000-11-16  6:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

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