bash: useradd: comand not found using telnet su

James Sutherland jas88 at
Fri Jul 21 16:48:19 GMT 2000

On Fri, 21 Jul 2000, Damen Rund wrote:

> Hello,
> once again I'm stumped.  I telnet into my Linux box as myself then run a
> su command to login as root, then I want to add a user so I run the
> useradd command and get the response "bash: useradd: command not found"
> however if I goto the Linux box and log in as root I can use the useradd
> command with no problem.

This will be a result of "useradd" not being in YOUR user PATH variable.
When you log in as yourself, PATH is set for you; a simple "su" does not
then change it. Logging directly in as root, however, sets PATH to root's
value for this.

Solution: use "su -" in place of "su". This will give you root's user
settings in place of your own.

Incidentally, this is NOT a Samba related question, so you're on the wrong
list :-)


More information about the samba-technical mailing list