tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: C2 Security and disabled accounts
@ 1998-01-30 23:04 Per Andersen
  0 siblings, 0 replies; only message in thread
From: Per Andersen @ 1998-01-30 23:04 UTC (permalink / raw)
  To: tru64-unix-managers

I want to thank Matthias E. Johnson for this solution that worked on my
Digital UNIX 4.0B system.

On 30 Jan, Per Andersen wrote:
> Has anyone written a C2 aware program that can unlock a disabled account
> form the command line? I want to add account unlocking capabilities to the
> Internet Alphaserver System Software (IASS) package that Digital
> distributes. At the moment I have an account clerk with the ability to
> created, deleted and change passwords through the web account management
> tool that comes with IASS. The only thing the clerk  can't do is unlock
the
> account. I like the web account tool because it is password protected and
I
> have set the system up so that it can be accessed only from selected IP
> addresses.
We use two shell scripts to unlock and lock accounts.  They follow (the
first is to unlock, the second to lock an account)  Each take a userid
as parameter.
---------------------------------------------------------------------------
#!/usr/bin/bash
# unlock account
if test -n "`/usr/tcb/bin/edauth -g $1 | grep u_lock`" ; then
    if test -n "`/usr/tcb/bin/edauth -g $1 | grep u_lock@`" ; then
        echo already unlocked
    else
        echo unlocking
        /usr/tcb/bin/edauth -g $1 | sed 's/:u_lock:/:u_lock@:/' |
/usr/tcb/bin/e
dauth -s
    fi
else
    echo unlocking
    /usr/tcb/bin/edauth -g $1 | sed 's/:chkent:/:u_lock@:chkent:/' |
/usr/tcb/bi
n/edauth -s
fi
-------------------------------------------------------------------------
#!/usr/bin/bash
#lock
if test -n "`/usr/tcb/bin/edauth -g $1 | grep u_lock`" ; then
    if test -n "`/usr/tcb/bin/edauth -g $1 | grep u_lock@`" ; then
        echo locking
        /usr/tcb/bin/edauth -g $1 | sed 's/:u_lock@:/:u_lock:/' |
/usr/tcb/bin/e
dauth -s
    else
        echo already locked
    fi
else
    echo locking
    /usr/tcb/bin/edauth -g $1 | sed 's/:chkent:/:u_lock:chkent:/' |
/usr/tcb/bin
/edauth -s
fi
---------------------------------------------------------------------------


--
- johnny waveswaveswaves bye-bye
Matthias E. Johnson
http://krypton.mankato.msus.edu/~matthias/html/
matthias.johnson@mankato.msus.edu
finger matthias@krypton.mankato.msus.edu for pgp public key

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

only message in thread, other threads:[~1998-01-30 23:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-01-30 23:04 SUMMARY: C2 Security and disabled accounts Per Andersen

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