passwd 사용시 에러.

nemonein의 이미지

안녕하세요.
루트가 아닌 개인 사용자로 로그인 한 후, passwd 명령을 실행하면 다음과 같은 에러가 나옵니다.

passwd: Authentication token manipulation error

비슷한 질문은 있는데 답은 없더군요...
이 문제가 보안과 관련된 문제인건지요?

꼭 답변 부탁드립니다.

익명 사용자의 이미지

안녕하세요.

자답입니다.
위와 같이 된 이유는, passwd 파일의 퍼미션이 잘못부여되어 생긴 문제였습니다. 어찌된 일인지는 모르나, passwd 파일의 퍼미션이 잘못되어 있었습니다.

퍼미션은 아래와 같이 되어 있어야 정상입니다.
ls -al /usr/bin/passwd
-r-s--x--x 1 root root

따라서, 4511 로 변경하면 정상적으로 작동합니다.

그런데...
문제는 s 퍼미션이 뜻하는 바를 모르겠습니다.
혹시 아시는 분 도움 부탁드립니다!

neogeo의 이미지

자답이 wrote:
안녕하세요.

자답입니다.
위와 같이 된 이유는, passwd 파일의 퍼미션이 잘못부여되어 생긴 문제였습니다. 어찌된 일인지는 모르나, passwd 파일의 퍼미션이 잘못되어 있었습니다.

퍼미션은 아래와 같이 되어 있어야 정상입니다.
ls -al /usr/bin/passwd
-r-s--x--x 1 root root

따라서, 4511 로 변경하면 정상적으로 작동합니다.

그런데...
문제는 s 퍼미션이 뜻하는 바를 모르겠습니다.
혹시 아시는 분 도움 부탁드립니다!

s 퍼미션은 set uid 퍼미션이라고 해서

그 바이너리를 실행하는 동안은 그 파일의 소유자와 같은 권한과 상태를 가지게 되는것을 의미합니다.

( 즉 저 경우 passwd 실행중엔 잠시 root 처럼 행동 할 수 있는 셈이지요 )

보안상 위험하기 때문에 보통 저런데 set uid 를 붙이기 보단

sudo 등을 사용해서 간접적으로 passwd 를 쓰게 하느라 set uid 가 빠진 모양입니다.

배포판 정보등을 살피시면 정확히 왜 빠져있는지 아실 수 있을겁니다.

Neogeo - Future is Now.

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.