Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]normal user cannot resolve hosts, ping permission...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
gorg86
Apprentice
Apprentice


Joined: 20 May 2011
Posts: 299

PostPosted: Thu Jun 16, 2016 12:30 am    Post subject: [SOLVED]normal user cannot resolve hosts, ping permission... Reply with quote

Hello,

I cannot do ping and I cannot resolve hosts with my normal user.
I'm going nuts here.

strace ping www.google.com
Code:
execve("/bin/ping", ["ping", "www.google.com"], [/* 35 vars */]) = 0
brk(0)                                  = 0x2316000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ac4258000
access(0x7f3ac4055e70, R_OK)            = -1 ENOENT (No such file or directory)
open(0x7ffd4dfda250, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfda250, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfda250, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfda250, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfda250, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat(0x7ffd4dfda250, 0x7ffd4dfda310)    = -1 ENOENT (No such file or directory)
open(0x7ffd4dfda250, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat(0x7ffd4dfda250, 0x7ffd4dfda310)    = -1 ENOENT (No such file or directory)
open(0x7ffd4dfda250, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat(0x7ffd4dfda250, 0x7ffd4dfda310)    = -1 ENOENT (No such file or directory)
open(0x7ffd4dfda250, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat(0x7ffd4dfda250, {...})             = 0
open(0x7ffd4dfda250, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat(0x7ffd4dfda250, 0x7ffd4dfda310)    = -1 ENOENT (No such file or directory)
open(0x7ffd4dfda250, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat(0x7ffd4dfda250, 0x7ffd4dfda310)    = -1 ENOENT (No such file or directory)
open(0x7ffd4dfda250, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat(0x7ffd4dfda250, 0x7ffd4dfda310)    = -1 ENOENT (No such file or directory)
open(0x7ffd4dfda250, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat(0x7ffd4dfda250, {...})             = 0
open(0x7f3ac4053862, O_RDONLY|O_CLOEXEC) = 3
fstat(3, {...})                         = 0
mmap(NULL, 64377, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3ac4248000
close(3)                                = 0
open(0x7f3ac4258778, O_RDONLY|O_CLOEXEC) = 3
read(3, 0x7ffd4dfda470, 832)            = 832
fstat(3, {...})                         = 0
mmap(NULL, 3804760, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f3ac3c96000
mprotect(0x7f3ac3e2d000, 2097152, PROT_NONE) = 0
mmap(0x7f3ac402d000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x197000) = 0x7f3ac402d000
mmap(0x7f3ac4033000, 15960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f3ac4033000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ac4247000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ac4246000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ac4245000
arch_prctl(ARCH_SET_FS, 0x7f3ac4246700) = 0
mprotect(0x7f3ac402d000, 16384, PROT_READ) = 0
mprotect(0x608000, 4096, PROT_READ)     = 0
mprotect(0x7f3ac4259000, 4096, PROT_READ) = 0
munmap(0x7f3ac4248000, 64377)           = 0
getuid()                                = 1000
geteuid()                               = 1000
setresuid(-1, 1000, -1)                 = 0
setresuid(-1, 1000, -1)                 = 0
socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) = -1 EPERM (Operation not permitted)
getuid()                                = 1000
setresuid(-1, 1000, -1)                 = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_ICMP) = -1 EACCES (Permission denied)
brk(0)                                  = 0x2316000
brk(0x2337000)                          = 0x2337000
getpid()                                = 3094
open(0x7f3ac3dff24d, O_RDONLY|O_CLOEXEC) = 3
fstat(3, {...})                         = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ac4257000
read(3, 0x7f3ac4257000, 4096)           = 149
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f3ac4257000, 4096)            = 0
uname({...})                            = 0
stat(0x7f3ac3dff24d, {...})             = 0
open(0x7f3ac3dff24d, O_RDONLY|O_CLOEXEC) = 3
fstat(3, {...})                         = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ac4257000
read(3, 0x7f3ac4257000, 4096)           = 149
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f3ac4257000, 4096)            = 0
uname({...})                            = 0
open(0x7f3ac3dff389, O_RDONLY|O_CLOEXEC) = 3
fstat(3, {...})                         = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ac4257000
read(3, 0x7f3ac4257000, 4096)           = 508
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f3ac4257000, 4096)            = 0
open(0x7ffd4dfd9af0, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfd9af0, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfd9af0, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfd9af0, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfd9af0, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfd9af0, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7f3ac4053862, O_RDONLY|O_CLOEXEC) = 3
fstat(3, {...})                         = 0
mmap(NULL, 64377, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3ac4248000
close(3)                                = 0
open(0x2316490, O_RDONLY|O_CLOEXEC)     = 3
read(3, 0x7ffd4dfd9d20, 832)            = 832
fstat(3, {...})                         = 0
mmap(NULL, 2139560, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f3ac3a8b000
mprotect(0x7f3ac3a95000, 2093056, PROT_NONE) = 0
mmap(0x7f3ac3c94000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x7f3ac3c94000
close(3)                                = 0
mprotect(0x7f3ac3c94000, 4096, PROT_READ) = 0
munmap(0x7f3ac4248000, 64377)           = 0
open(0x7f3ac3dff294, O_RDONLY|O_CLOEXEC) = 3
fstat(3, {...})                         = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ac4257000
read(3, 0x7f3ac4257000, 4096)           = 935
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f3ac4257000, 4096)            = 0
open(0x7f3ac3a92dd1, O_RDONLY|O_CLOEXEC) = 3
fstat(3, {...})                         = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ac4257000
read(3, 0x7f3ac4257000, 4096)           = 1079
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f3ac4257000, 4096)            = 0
open(0x7ffd4dfd9b00, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfd9b00, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfd9b00, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfd9b00, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfd9b00, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfd9b00, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7f3ac4053862, O_RDONLY|O_CLOEXEC) = 3
fstat(3, {...})                         = 0
mmap(NULL, 64377, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3ac4248000
close(3)                                = 0
open(0x23165e0, O_RDONLY|O_CLOEXEC)     = 3
read(3, 0x7ffd4dfd9d30, 832)            = 832
fstat(3, {...})                         = 0
mmap(NULL, 2117896, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f3ac3885000
mprotect(0x7f3ac388a000, 2093056, PROT_NONE) = 0
mmap(0x7f3ac3a89000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x7f3ac3a89000
close(3)                                = 0
open(0x7ffd4dfd9880, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfd9880, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfd9880, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfd9880, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfd9880, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x7ffd4dfd9880, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open(0x2316620, O_RDONLY|O_CLOEXEC)     = 3
read(3, 0x7ffd4dfd9aa0, 832)            = 832
fstat(3, {...})                         = 0
mmap(NULL, 2190152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f3ac366e000
mprotect(0x7f3ac3681000, 2097152, PROT_NONE) = 0
mmap(0x7f3ac3881000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13000) = 0x7f3ac3881000
mmap(0x7f3ac3883000, 6984, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f3ac3883000
close(3)                                = 0
mprotect(0x7f3ac3881000, 4096, PROT_READ) = 0
mprotect(0x7f3ac3a89000, 4096, PROT_READ) = 0
munmap(0x7f3ac4248000, 64377)           = 0
socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3
connect(3, {...}, 16)                   = 0
poll([?] 0x7ffd4dfd8fc0, 1, 0)          = 1
sendto(3, 0x7ffd4dfd9120, 32, MSG_NOSIGNAL, NULL, 0) = 32
poll([?] 0x7ffd4dfd8fc0, 1, 5000)       = 1
ioctl(3, FIONREAD, 0x7ffd4dfd8fbc)      = 0
recvfrom(3, 0x7ffd4dfd9cb0, 1024, 0, {...}, [?]) = 48
close(3)                                = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
connect(3, {...}, 16)                   = 0
getsockname(3, 0x61a610, 0x7ffd4dfda66c) = 0
close(3)                                = 0
dup(2)                                  = 3
fcntl(3, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(3, {...})                         = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ac4257000
write(3, 0x7f3ac4257000, 42ping: icmp open socket: Permission denied
)            = 42
close(3)                                = 0
munmap(0x7f3ac4257000, 4096)            = 0
exit_group(2)                           = ?
+++ exited with 2 +++


Any suggestions?


Last edited by gorg86 on Thu Jun 16, 2016 1:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Jun 16, 2016 1:40 am    Post subject: Reply with quote

gorg86 ...

ping{,6} is nolonger installed suid, now 'caps' (linux capablities) are used:

Code:
# equery -NC u net-misc/iputils | grep caps
 + + caps            : Use Linux capabilities library to control privilege
 + + filecaps        : Use Linux file capabilities to control privilege rather than set*id (this is orthogonal to USE=caps which uses capabilities at runtime e.g. libcap)
# getcap /bin/ping
/bin/ping = cap_net_raw+ep
# su -c 'ping -c1 forums.gentoo.org' khayyam
PING gossamer-ipvs-forums-v4v6.gentoo.org (204.187.15.12) 56(84) bytes of data.
64 bytes from forums.gentoo.org (204.187.15.12): icmp_seq=1 ttl=50 time=166 ms

--- gossamer-ipvs-forums-v4v6.gentoo.org ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 166.431/166.431/166.431/0.000 ms

HTH & best ... khay
Back to top
View user's profile Send private message
gorg86
Apprentice
Apprentice


Joined: 20 May 2011
Posts: 299

PostPosted: Thu Jun 16, 2016 1:29 pm    Post subject: Reply with quote

Thanks for your response but the tool is definatley installed on my system.
I solved the issue by doing an "emerge -e world" as a last resort.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum