달력

42024  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

보안에 문제가 많을 듯 ㅡㅡ


--stdin 이라는걸 오늘 첨 알았음... 리눅스 계열 밖에 없는듯 합니다.


FreeBSD 에는 없넹..


================================================================================

파일 이름 : uadd.sh

퍼미션     : 700

사용법     : uadd.sh 아이디 패스워드

================================================================================

#!/bin/bash
userId=$1;
userPasswd=$2;

# User Add
/usr/sbin/useradd $userId

echo $userPasswd | /usr/bin/passwd --stdin $userId



 

================================================================================

파일 이름 : chpwd.sh

퍼미션     : 700

사용법     : chpwd.sh 아이디 패스워드

================================================================================

#!/bin/bash
userId=$1;
userPasswd=$2;

echo $userPasswd | /usr/bin/passwd --stdin $userId

================================================================================

파일 이름 : duser.sh

퍼미션     : 700

사용법     : duser.sh 아이디

================================================================================

#!/bin/bash

userId=$1;

userdel -r $userId



쓰고보니 허접의 극치를 달리는군 ㅡㅡ


Posted by tornado
|