1

I use rkhunter on all of my RPis, since some are used as dedicated servers, to try and ensure no rootkits or other malware are installed on them. When I did the check as usual today, I got the following error message one one of three Pis:

nat@PiVPN:~ $ sudo rkhunter -c
Invalid SCRIPTWHITELIST configuration option: Non-existent pathname: /usr/sbin/adduser

Concerned by this, I tried to run the adduser command, both with sudo and as the actual root user and got this error:

root@PiVPN:/home/nat# adduser foo
bash: adduser: command not found

Should I be concerned by this, and how am I able to re-install or find this command?

System Information:
Raspberry Pi 2 Model B Rev 1.1

OS Information:
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.8 (stretch)
Release: 9.8
Codename: stretch

Many Thanks, Nathaniel

2 Answers 2

3

The Foundation's documentation make it sound that adduser should be present on a recent Raspbian:

Create a new user

You can create additional users on your Raspbian installation with the adduser command.

Enter sudo adduser bob and you'll be prompted for a password for the new user bob. Leave this blank if you don't want a password.

If it is missing for whatever reason (though I would wonder why that is) you can try to reinstall it:

sudo apt-get install adduser
1
  • Thanks @Ghanima, I tried this already and it said that adduser was already the newest version so nothing was installed and the problem persisted. However after a reboot the issue was resolved. Not sure what the cause was but thanks for the help. Commented Mar 17, 2019 at 21:15
0

Sounds like your path was screwed up. Make sure /usr/sbin is in your path. I have it set in my root user's .bashrc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.