I removed the _apt user by accident, and every time I update the software, I get this message: No sandbox user '_apt' on the system, can not drop privileges.
How can I solve this problem ?
Asked
Active
Viewed 3.9k times
8
Zach Bloomquist
- 294
E.A
- 81
2 Answers
8
You can re-create the _apt user by using the following command:
sudo adduser --force-badname --system --no-create-home _apt
It doesn't matter what you put for the password or any other fields.
Then, apt will continue to work as normal.
Zach Bloomquist
- 294
7
Add the _apt user back to /etc/passwd and /etc/shadow:
$ sudo grep _apt /etc/passwd /etc/shadow
/etc/passwd:_apt:x:168:65534::/nonexistent:/bin/false
/etc/shadow:_apt:*:17121:0:99999:7:::
YMMV: The _apt UID on my system is 168, and yours may not be 168 on your system - the value should be unique, and greater than 100.
waltinator
- 37,856