How to install usermod in Alpine Linux

Problem:

When trying to use usermod in Alpine Linux, you see the following error message:

usermod_error.txt
-ash: usermod: not found

Solution

Install usermod and related tools by adding the community repositories and using

install_usermod.sh
echo http://dl-2.alpinelinux.org/alpine/edge/community/ >> /etc/apk/repositories
apk add -U shadow

 


Check out similar posts by category: Alpine Linux