Nethunter apt issue resolving

Been a while since I fired up my Nethunter tablet, its such a great form factor, small and portable. It has not been used in anger yet, but I do like to keep all my devices updated. Especially with the latest versions of exploit-db fresh from the Kali repo’s 🙂

Unfortunately that task failed. :-/

Issue: Apt fails to resolve, error below.

root@kali:~# apt-get update
Err:1 kali-rolling InRelease
Temporary failure resolving ''
Reading package lists... Done
W: Failed to fetch Temporary failure resolving ''
W: Some index files failed to download. They have been ignored, or old ones used instead.

The standard checks of /etc/resolv.conf to see if I was missing any DNS servers. Then the /etc/hosts file also in case anything weird was stopping the resolver from trying DNS. All looked normal.

Other things such as dig and apps such as Firefox were behaving normally. This meant it was not a networking issue or a real resolver issue system wise. It was unique to apt.


A web search provided the following check and fix.

grep 'apt' /etc/passwd|

Update the ‘_apt’ UID to 0


/etc/passwd format:
username:password:UID:GID:user info:Home dir:command shell

Related Bug: apt-get errors

Explanation (sort of): seems like the user _apt had issues using the resolver, update the UID and things worked fine. No real explanation in the bug report other than it was fixed in later releases.

Note: The permission on /etc/resolv.conf were set to -rw—— but updating these so users could read the file did not fix this. So the original fix above still stands.

Hope this helps someone.