tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Per Andersen <p.andersen () ttu ! edu>
To: tru64-unix-managers
Subject: SUMMARY: C2 Security and disabled accounts
Date: Fri, 30 Jan 1998 23:04:12 +0000	[thread overview]
Message-ID: <96078654411178.tru64-unix-managers.marc@archive.invalid> (raw)

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

                 reply	other threads:[~1998-01-30 23:04 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