3

I've set up a Debian 7 image on my ODROID U2 a few days ago and apparently I can only resolve DNS hostnames from a root login (su, sudo). From a normal user, I can ping IP addresses and names defined in /etc/hosts just fine. When I ping a domain name, wget a file or clone a git repository it immediately gives the message 'unknown host' or 'Could not resolve host'.

The /etc/nsswitch.conf is just the Debian default file and, as the title says, I can ping/install packages/download files just fine from the root account.

What can I do to solve this problem?

2 Answers 2

3

I would first check the permissions on /etc/resolv.conf and /etc/nsswitch.conf. Both of these should have read permissions for all. Test if you can read these files with cat or less. If you can't, then it is unlikely the resolver can.

You can run the resolver on its own with the command getent hosts google.com. Substitute google.com with whatever domain you want to look up.

1
  • Permissions for /etc/resolv.conf were apparently set wrong. Corrected it with chmod a+r /etc/resolv.conf and now it works. Thank you very much.
    – m.reening
    Jul 7, 2013 at 15:12
0

For Android system, there is another case which would lead to this issue: CONFIG_ANDROID_PARANOID_NETWORK was enable in kernel. Ref to this topic.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .