• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 限制單用戶登陸

    發表于:2007-05-26來源:作者:點擊數: 標簽:
    因公司的erp連線數量有限,需限制用戶每人只能有一個連線. 就寫了一個shell. 在/etc/profile中的最后一行加入以下內容: /home/root/limit_user.sh 以下為shell的內容: # more limit_user.sh #!/bin/ksh ########### search1=`who -m|awk '{print }'` limit_us
    因公司的erp連線數量有限,需限制用戶每人只能有一個連線.
    就寫了一個shell.

    在/etc/profile中的最后一行加入以下內容:
    /home/root/limit_user.sh

    以下為shell的內容:

    # more limit_user.sh
    #!/bin/ksh

    ###########
    search1=`who -m|awk '{print }'`
    limit_user=`grep "$" /home/root/limit_user.lst | grep -v grep | wc | awk '{print }'`
    no=`who | awk '{print }'|grep -w "$" | wc -l`
    if [ $limit_user -eq 1 -a $no -ge 2 ]    #在這里,如果將2改為3,則表示每個用戶可以有2個登陸,最多有兩個,以此類推.
    then
    echo 'this user only can login once,please conncet your admin'
    sleep 2
    exit 1
    fi
    echo "login system suclearcase/" target="_blank" >ccess"
    ###########


    將用戶列表寫入到/home/root/limit_user.lst文件中,每個用戶一行.
    如果用戶名不在limit_user.lst中出現,則此用戶是不受此限制的.
    以上在aix中測試通過.


    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>