Re: aix shell script

dfrench_at_mtxia.com
Date: 12/11/04

  • Next message: peter_at_peternolan.com: "Error Message 1540-0274 for defining semaphors"
    Date: 10 Dec 2004 15:35:59 -0800
    
    

    roger1991@hotmail.com wrote:
    > I need a shell script to stop duplicate concurrent logins. I need a
    > second script to timeout a logged in inactive user after a
    > predetermined time limit.
    > Thanks for your help.

    Procedure to limit logins to 1 login per user:

    1. Create the following script:

    /usr/bin/Block_user

    ---- Cut Here ----
    #!/bin/ksh
    USER="${1}"
    NUM=$( who | grep ${USER} | cut -c1-8 | wc -l )

    (( NUM < 1 )) && exit 0

    print "Permission Denied ... ${NUM} is the limit of logins"
    exit 1
    ---- Cut Here ----

    chmod 555 /usr/bin/Block_user

    2. Edit "/etc/security/login.cfg" and change the following lines:

    * auth_method:
    * program =

    to

    auth_method:
    program = /usr/bin/Block_user

    3. Edit "/etc/security/user" and change the auth1 line to:

    default:
    auth1 = SYSTEM,auth_method

    4. "root" should be set as an exception to this rule:

    root:
    auth1 = SYSTEM

    5. Existing user stanzas that should be limited, should be changed
    to:

     auth1 = SYSTEM,auth_method

    -- 
    Dana French
    

  • Next message: peter_at_peternolan.com: "Error Message 1540-0274 for defining semaphors"

    Relevant Pages

    • Re: Unix NOT secure against Viruses on home PCs
      ... because most users do not work as root. ... > Sadly it is not really a big problem to spoof these logins. ... > What I want to say is that there actually IS a threat to *nix by viruses! ... cooperation of a clueless user to execute the script after they save it. ...
      (comp.os.linux.security)
    • Re: writting to already connected database
      ... Logins.....that would confuse you and probably the script as well. ... username and password submited by a form exsist and that they match. ... script verifies that the username and password match have it write those values ... to is "logins" and the name of the column inside the table is "Logins". ...
      (microsoft.public.frontpage.client)
    • Re: aix shell script
      ... timed log out: ... there is a timed-logout variable for the shell. ... >>I need a shell script to stop duplicate concurrent logins. ...
      (comp.unix.aix)
    • Re: audit administrator login
      ... You could use this script and put it into a batch file with a list of your computer names passed as the for-next loop. ... Set colListOfServices = objWMIService.ExecQuery _ ... This posting is provided "AS IS" with no warranties, ... what is the best way to audit domain administrator logins, ...
      (microsoft.public.windows.server.active_directory)
    • Re: how to migrate users/logins with different domain account
      ... One option is to change domains for the logins using ... sp_revlogin created a script fine. ... 'olddomain' with 'newdomain' is out of the question. ...
      (microsoft.public.sqlserver.security)