Change a user password. If no name is specified,
changes the password for the current user.
Options:
-a Define which algorithm shall be used for the password.
(Choices: des, md5)
-d Delete the password for the specified user account.
-l Locks (disables) the specified user account.
-u Unlocks (re-enables) the specified user account.
expect를 써 보기 바랍니다.
expect를 써 보기 바랍니다.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Korean Ver: http://cinsk.github.io/cfaqs/
감사합니다. expect를 쓰니깐 되는 군요...헌데 리눅스에서는
감사합니다.
expect를 쓰니깐 되는 군요...
헌데 리눅스에서는 성공했는데요
임베디드 리눅스에서 하려고 보니깐
expect가 없네요...ㅠㅠ
이 소스는 어데서 구할 수 있을까요?
리눅스 초보라...^^
http://wiki.kldp.org/wiki.php/PackageMgm
http://wiki.kldp.org/wiki.php/PackageMgmt#s-2.5
http://wiki.kldp.org/wiki.php/PackageMgmt#s-3.9
--stdin 옵션이 있어요~
passwd 명령어 자체에 --stdin 옵션이 있습니다.
자세한 내용은 man 페이지를 참고하시구요..
echo "1234" | passwd root --stdin
예전에 제가 tip 게시판에서 봤었는데.. ^^ :D
^^
이렇게 나오는 군요...
/ # echo "1234" | passwd root --stdin
passwd: invalid option -- -
BusyBox v1.00 (2005.04.14-03:48+0000) multi-call binary
Usage: passwd [OPTION] [name]
Change a user password. If no name is specified,
changes the password for the current user.
Options:
-a Define which algorithm shall be used for the password.
(Choices: des, md5)
-d Delete the password for the specified user account.
-l Locks (disables) the specified user account.
-u Unlocks (re-enables) the specified user account.
레드 햇에서 제공하는 passwd의 경우에는 되는 모양입니다만, 안되는
레드 햇에서 제공하는 passwd의 경우에는 되는 모양입니다만, 안되는 경우도 있나 봅니다.
busybox에서는 지원하지 않나봅니다.
예전에... 저는... 그냥 crypt 함수로 passwd 파일에 직접
예전에... 저는... 그냥 crypt 함수로 passwd 파일에 직접 집어 넣었는데...
busybox 에서...
shadow 사용 여부에 따라 passwd 혹은 shadow 파일에 crypt된 문자열을 직접 넣으면 되겠죠!!!
댓글 달기