Red HatThis forum is for the discussion of Red Hat Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
There is less than 1 hour left to vote in the 2015 LinuxQuestions.org Members Choice Awards. Click here to go to the polls. Vote now and make sure your voice is heard! TIME IS RUNNING OUT!
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
if you dont get the usage: useradd then your program might be broken, have you tried goala's answer?
if you are at the command line as yourself then you will get that error message, type "su -" and it will ask for a password type in the root password and then try typing useradd etc im sure it will work,
I've tried Goala's answer by puting ./ before the command and it works fine.
Also I edited /home/root/.bash_profile file, added the line: PATH=$PATH:/usr/sbin, it works fine, thanks guys
I have another question:
What is the difference between [su] and [su -] because I have to execute [su -] to be able to use useradd?
but if I execute [su] and then execute the command useradd it gives me: Command not found
I told you about putting ./ infront of the command which by the way still wouldnt have worked unless you were as root, as for your second question, su just emulates a user login but doesnt set up all the profiles, su - however is just like logging in on a terminal, it set up all the profiles and permissions, i pulled this info from an old unix manual.
cmd, you only connect as that user (or root if no user specified), but you retain your original env settings. Adding the '-' gives you the target user's settings, exactly as if you had logged in as him/her ie