htpasswd 명령어를 이용했는데...

puser716의 이미지

htpasswd -c passwd test 1111 이라는 명령어를 사용하니 그 뒤 부터 passwd 라는 명령어를 이용하여 암호를 변경하려고 하니 아래와 같은 에러(?)가 뜹니다.

passwd
/usr/bin/passwd: line 1: test:t8yYvXrxqBnnM: command not found

이거 좀 이상하네요...

다시 passwd 명령어 사용하고 싶은데 어떻게 하면 될 지....

codebank의 이미지

혹시 htpasswd... 라는 명령을 /etc 디렉토리에서 실행시키신건 아닌지 모르겠습니다.
htpasswd의 -c옵션은 바로 다음에 나오는 파일에 계정과 암호를 암호화한 형태를
만듭니다. 그런데 경로를 지정하지 않으면 현재 파일에 파일을 만들게 되는데...
제가 볼 때는 /etc 디렉토리에서 위 명령을 실행하지 않았나 생각되네요.
다른 방법은 잘 생각나지 않고 /etc/passwd- 라는 파일을 /etc/passwd라는 파일에
덮어쓰고 chmod 644로 바꿔주는 방법밖에는 생각안나네요.

# cd /etc
# cp passwd- passwd
# chmod 644 passwd

passwd-에는 마지막 계정 사용자는 포함되지 않는다는 것을 기억하시고 위 작업을
한 후에 마지막에 추가한 계정 사용자를 추가해주시면 될겁니다.
혹시 모르니 /etc/passwd 파일과 /etc/passwd- 파일을 비교해보세요.
첫번째에 test:t8y... 만 추가 되어있다면 그것만 지워줘도 가능할걸로 생각됩니다.

마지막으로 htpasswd는 시스템에서 사용하는 명령이 아니라 아파치에서 사용하는
페이지에서 패스워드가 필요할 때 사용하는 명령입니다.
자세한건
http://httpd.apache.org/docs/2.0/ko/programs/htpasswd.html
를 참고해 보세요.
------------------------------
좋은 하루 되세요.

------------------------------
좋은 하루 되세요.

puser716의 이미지

일단 /etc/passwd 파일이 변경 된 건 아니구요.

/usr/bin/ 안에 있는 passwd(명령어...죠..ㅠ.ㅠ) 이 파일을 변경하는 바람에..생겼던 문제였습니다.

같은 버전에 있는 파일을 복사해서 다시 원상 복귀 시켰습니다...

답변 다시 한 번 고맙습니다...

그리고 달아 주신 링크 잘 보겠습니다.

===========================
후회하지 말자~

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.