LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   groupadd and useradd bash commands (https://www.linuxquestions.org/questions/linux-newbie-8/groupadd-and-useradd-bash-commands-175544/)

ph0ngwh0ng 04-28-2004 11:06 AM

groupadd and useradd bash commands
 
Hello,

I just installed RH9.0.

I want to add users and groups in the terminal, but the commands groupadd and useradd, and any of their relatives, are missing. How can i fix this?

Thanks.

hw-tph 04-28-2004 11:42 AM

They are probably there, but missing from your $PATH. As root (use the su command to become root, don't log in as the root user) type echo $PATH. If the resulting list lacks /sbin, /usr/sbin and /usr/local/sbin you can add them permanently to your path by editing root's ~/.bashrc and adding the following line:
Code:

PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
You can make the changes take effect immidiately by typing source ~/.bashrc (still as root). Echo your $PATH again and you should see the sbin dirs in the list of directories that are searched for executables.

Or, if all this seems like it's not worth it just type the full path to the commands, which are typically located in /usr/sbin, so you would type /usr/sbin/useradd and so on.


Håkan


All times are GMT -5. The time now is 09:34 PM.