Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
I am trying to learn shell scripting from a book and all I am doing is following few instruction from the book.
Now this is what I am doing.
I am trying to add a user using the useradd command so I run the following
at command prompt
The first time when I add this user I was successful.Later I deleted this suer using the userdel -r ajit command.Now when again I am trying to add this user it gives me following error.
useradd: group ajit exists - if you want to add this user to that group, use -g.
Now when I try using the -g option with the useradd command it gives we all the set off options avaiable to use along with the useradd command but doesnt create the ajit use
Can anyone tell me how can I create the same user after deleting it.
It tells you what the problem is-- "useradd: group ajit exists", remove the group or tinker with the options of your useradd. -g requires a group to be specified... ajit in this case. When in doubt look up the option for the program by typing: man programname (eg: man useradd) and check that you're using each option correctly.
The only reason I don't typically suggest people use usermod is because its default behavior is destructive. If a new user has setup say 20 people in a specific group and forgets the -a it will replace the group with just the user(s) being added. It's not really an issue if you have good backups (although a bit annoying with tape backups), but the most common problem I see in any operating system is a lack of backups.