Quoting Carlo Sogono <[EMAIL PROTECTED]>:

> > 1. you could cron a script which runs 'passwd -l <username>' at 5pm
> > and then 'passwd -u <username>' at 8am.  and another script which
> tells
> > your nas to disconnect the user at 8pm.
> What do the -u and -l options do, exactly?

===============<snip>==============
$ passwd --help
Usage: passwd [OPTION...] <accountName>
  -d, --delete        delete the password for the named account (root only)
  -f, --force         force operation
 
  -k, --keep-tokens   keep non-expired authentication tokens
  -l, --lock          lock the named account (root only)
  -S, --status        report password status on the named account (root only)
  --stdin             read new tokens from stdin (root only)
  -u, --unlock        unlock the named account (root only)
 
Help options
  -?, --help          Show this help message
  --usage             Display brief usage message 
===============<snip>==============

this is equivalent to 'usermod' with the ff switches:

       -L     Lock a user's password.  This puts a '!'  in  front
              of  the  encrypted  password, effectively disabling
              the password.  You can't use this option with -p or
              -U.
 
       -U     Unlock  a user's password.  This removes the '!' in
              front of the encrypted  password.   You  can't  use
              this option with -p or -L. 


the passwd binary in older versions of redhat doesn't support this.
slackware otoh, has supported this as far as i can remember.
so ymmv.

peace!
-eric
--
 .--.  Enrique D. Rosel II                     office://+63.2.894.3592/
( () ) Q Linux Solutions, Inc.
 `--\\ A Philippine Open Source Solutions Co.  http://www.q-linux.com/

_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Reply via email to