Why can’t I run userdel on Debian 13?

0
30
Asked By CuriousCactus57 On

I'm setting up a VPS that's running Debian 13, but I'm having trouble using the userdel and deluser commands. When I try to execute them, I get a "command not found" error. However, I can still access their man pages. I'm logged in as root because I'm trying to delete an old user account. I'm not sure where things went wrong in my server setup. Do you think it would be better to just start from scratch since I wouldn't lose much data?

4 Answers

Answered By SysAdminSprout On

It might be that userdel isn't in your PATH. On Debian, userdel is usually located in /usr/sbin/. You might need to add that to your PATH or use the full path to the command. What did you decide to do eventually?

CuriousCactus57 -

I reinstalled, and I was just thinking about how to avoid this in the future. Typing /usr/sbin/[command] every time doesn't sound appealing!

Answered By TechieTurtle92 On

Are you sure you're logged in as root? That's essential for using userdel. Just checking!

CuriousCactus57 -

Yeah, I'm trying to do this as root. I ended up reinstalling because I realized I only lost about an hour of work—mostly just waiting around.

Answered By NerdyNinja99 On

Sometimes, on headless setups, you need to install sudo even as root to run certain commands without issues. You might find that helps with rebooting or resizing too.

Answered By InfoGuru88 On

You can check if the commands are installed properly by running `dpkg -S /usr/sbin/{deluser,userdel}` and also ensure /usr/sbin is on root's PATH. That directory is typically available by default, but it's worth confirming!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.