본문 바로가기

리눅스

[명령어] mkpasswd 명령

728x90

mkpasswd 명령

$ mkpasswd
-bash: mkpasswd: command not found

expect 패키지 설치(mkpasswd 명령)

$ yum install -y expect


$ which mkpasswd
/usr/bin/mkpasswd

사용법

usage: mkpasswd [args] [user]
  where arguments are:
    -l #      (length of password, default = 9)
    -d #      (min # of digits, default = 2)
    -c #      (min # of lowercase chars, default = 2)
    -C #      (min # of uppercase chars, default = 2)
    -s #      (min # of special chars, default = 1)
    -v        (verbose, show passwd interaction)
    -p prog   (program to set password, default = /bin/passwd)
$ mkpasswd -l 24
ayelvdhbiqiexh1kp0Fyx?kO
728x90