how is it possible that the useradd command is not found although a man entry exists?

Best Answers
-
Hi @austrianadmin,
1.- What Debian version are you running?
2.- On Debian it seems that 'useradd' is provided by the passwd tool. So the documentation should be provided by the same package. You can check on it as follows:dpkg -L passwd
3.- Can you try using 'adduser' instead? Perhaps something related to sudo and/or the PATH variable isn't working as expected.
4.- You also can do this in order to find the tool:
which useradd
/usr/sbin/useraddsudo find /usr/sbin/ -name useradd
/usr/sbin/useradd(Or look for it on / using sudo).
But that's Ubuntu.
Regards,
Luis.0 -
Hi Berni,
I did a test on Debian 13.2 and both tools -adduser and useradd- worked:
luis@debiansrv:~$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.2
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"luis@debiansrv:~$ sudo adduser user1
New password:
Retype new password:
passwd: password updated successfully
Changing the user information for user1
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] Yluis@debiansrv:~$ id user1
uid=1001(user1) gid=1001(user1) groups=1001(user1),100(users)luis@debiansrv:~$ sudo useradd user2
luis@debiansrv:~$ id user2
uid=1002(user2) gid=1002(user2) groups=1002(user2)So, please try on Debian 13, as some issues related to Debian 12 could be playing a role here (you also can Google for 'debian 12 adduser won't run').
Regards,
Luis.0
Answers
-
Hi Luis,
It is Debian 12, i tried adduser instead...my PATH Variable: echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin
....is it the PATH?.....when i type which useradd....no reaction...then i tried...sudo find /usr/sbin/-name useradd
[sudo] password for newuser1:
find: ‘/usr/sbin/-name’: No such file or directory
find: ‘useradd’: No such file or directory
....i would love to solve that issue..thanks for your helpbest berni
0 -
Hi Berni.
Just trying to help you here. Look again at your reply:
echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/binThe /usr/sbin (or /sbin) directory is missing in your PATH. Try adding it.
Regards,
Pablo.0 -
Hi Pablo,
i changed that with: export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin
thanks
best regardsberni
0
Categories
- All Categories
- 177 LFX Mentorship
- 177 LFX Mentorship: Linux Kernel
- 766 Linux Foundation IT Professional Programs
- 378 Cloud Engineer IT Professional Program
- 174 Advanced Cloud Engineer IT Professional Program
- 75 DevOps IT Professional Program - Discontinued
- 7 DevOps & GitOps IT Professional Program
- 101 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- 4 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 10 Cloud & Containers Training
- 1 Cybersecurity Training
- 2 DevOps & Site-Reliability Training
- 1 Linux Kernel Development Training
- 1 Networking Training
- 2 Open Source Best Practice Training
- 2 System Administration Training
- 1 System Engineering Training
- 1 Web & Application Development Training
- 796 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 91 Storage
- 770 Linux Distributions
- 81 Debian
- 68 Fedora
- 23 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 116 Mobile Computing
- 20 Android
- 81 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 395 Off Topic
- 121 Introductions
- 30 Study Material
- 997 Programming and Development
- 310 Kernel Development
- 669 Software Development
- 1K Software
- 398 Applications
- 182 Command Line
- 5 Compiling/Installing
- 69 Games
- 318 Installation
- Archived
- 183 Small Talk
- 2 LFD140 Class Forum
- 1.4K LFS258 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)