Ping: only for root (bin aber als root drin...)

Dieses Thema im Forum "Linux-Distributionen" wurde erstellt von CHfish, 1. März 2004.

Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. CHfish

    CHfish Byte

    Code:
    login as: root
    root@195.177.*.*'s password:
    Last login: Mon Mar  1 21:27:12 2004 from * on pts/2
    
    Most of the programs included with the Debian GNU/Linux system are
    freely redistributable; the exact distribution terms for each program
    are described in the individual files in /usr/share/doc/*/copyright
    
    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    Last login: Mon Mar  1 21:27:12 2004 from *
    vl11s12:~# ping irc.euirc.net
    ping: ping must run as root
    wie ist das möglich?

    CHfish
     
  2. CHfish

    CHfish Byte

    JA is die /bin/ping ping Datei...

    Code:
    execve("/bin/ping", ["ping"], [/* 13 vars */]) = 0
    uname({sys="Linux", node="vl11s12", ...}) = 0
    brk(0)                                  = 0x805c91c
    open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
    open("/etc/ld.so.cache", O_RDONLY)      = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=9344, ...}) = 0
    old_mmap(NULL, 9344, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
    close(3)                                = 0
    open("/lib/libc.so.6", O_RDONLY)        = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\30\222"..., 1024) = 1024
    fstat64(3, {st_mode=S_IFREG|0755, st_size=1153784, ...}) = 0
    old_mmap(NULL, 1166560, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40017000
    mprotect(0x4012a000, 40160, PROT_NONE)  = 0
    old_mmap(0x4012a000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x113000) = 0x4012a000
    old_mmap(0x40130000, 15584, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40130000
    close(3)                                = 0
    munmap(0x40014000, 9344)                = 0
    getuid32()                              = 0
    brk(0)                                  = 0x805c91c
    brk(0x805cd34)                          = 0x805cd34
    brk(0x805d000)                          = 0x805d000
    open("/etc/nsswitch.conf", O_RDONLY)    = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=456, ...}) = 0
    old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
    read(3, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 456
    brk(0x805e000)                          = 0x805e000
    read(3, "", 4096)                       = 0
    close(3)                                = 0
    munmap(0x40014000, 4096)                = 0
    open("/etc/ld.so.cache", O_RDONLY)      = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=9344, ...}) = 0
    old_mmap(NULL, 9344, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
    close(3)                                = 0
    open("/lib/libnss_db.so.2", O_RDONLY)   = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220\22"..., 1024) = 1024
    fstat64(3, {st_mode=S_IFREG|0644, st_size=16944, ...}) = 0
    old_mmap(NULL, 20336, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40134000
    mprotect(0x40138000, 3952, PROT_NONE)   = 0
    old_mmap(0x40138000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x3000) = 0x40138000
    close(3)                                = 0
    open("/lib/libnss_files.so.2", O_RDONLY) = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\35\0\000"..., 1024) = 1024
    fstat64(3, {st_mode=S_IFREG|0644, st_size=32668, ...}) = 0
    old_mmap(NULL, 36112, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40139000
    mprotect(0x40141000, 3344, PROT_NONE)   = 0
    old_mmap(0x40141000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x7000) = 0x40141000
    close(3)                                = 0
    open("/usr/lib/libdb3.so.3", O_RDONLY)  = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\311\0"..., 1024) = 1024
    fstat64(3, {st_mode=S_IFREG|0644, st_size=684092, ...}) = 0
    old_mmap(NULL, 687628, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40142000
    mprotect(0x401e9000, 3596, PROT_NONE)   = 0
    old_mmap(0x401e9000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xa6000) = 0x401e9000
    close(3)                                = 0
    munmap(0x40014000, 9344)                = 0
    open("/var/lib/misc/protocols.db", O_RDWR|O_LARGEFILE) = -1 ENOENT (No such file or directory)
    open("/var/lib/misc/protocols.db", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
    open("/etc/protocols", O_RDONLY)        = 3
    fcntl64(3, F_GETFD)                     = 0
    fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
    fstat64(3, {st_mode=S_IFREG|0644, st_size=1748, ...}) = 0
    old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
    read(3, "# /etc/protocols:\n# $Id: protoco"..., 4096) = 1748
    close(3)                                = 0
    munmap(0x40014000, 4096)                = 0
    socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) = -1 EPERM (Operation not permitted)
    write(2, "ping: ping must run as root\n", 28ping: ping must run as root
    ) = 28
    _exit(2)                                = ?
    hmm

    open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/var/lib/misc/protocols.db", O_RDWR|O_LARGEFILE) = -1 ENOENT (No such file or directory)
    open("/var/lib/misc/protocols.db", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)


    CHfish
     
  3. cirad

    cirad Kbyte

    Ah richtig, hatte ich eben gar nicht gesehen, daß du dich schon als root eingeloggt hast. Schön, daß man das ganze noch unterständlicher. :D Die Rechte stimmen jedenfalls. :)

    Hmm, dann fällt mir auch nichts mehr großartiges ein, außer mit "which ping" zu gucken, ob wirklich das richtige (bei dir wohl /bin/ping) ausgeführt wird. Aber selbst wenn nicht, dann wäre die Fehlermeldung komisch.

    Eventuell erfährt man durch strace mehr (strace ping).
     
  4. CHfish

    CHfish Byte

    -r-sr-xr-x 1 root root 15244 Nov 18 2001 ping
    (Ordner ping)

    aber:

    vl11s12:/bin# ping www.pcwelt.de
    ping: ping must run as root :rolleyes:

    mit: root@195.177.*'s password:, natürlich

    aber trotzdem danke

    CHfish

    (vl11s12:/# ls -l $(whereis -b ping)
    ls: ping:: No such file or directory
    -r-sr-xr-x 1 root root 15244 Nov 18 2001 /bin/ping
    vl11s12:/#
    )
     
  5. cirad

    cirad Kbyte

    Was sagt ls -l $(whereis -b ping)?
    Die Rechte von Ping sollten -r-sr-xr-x oder wenigstens -rwsr-xr-x sein. Wichtig ist das s, damit ping root-Reche bekommt, ohne das ICMP afaik nicht möglich ist.

    chmod 4555 /sbin/ping (oder wo auch immer es bei dir liegt) sollte setuid entsprechend setzen.
     
Status des Themas:
Es sind keine weiteren Antworten möglich.

Diese Seite empfehlen