ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
Originally posted by scorbett You could also check to see if a directory named after the user exists in the /home directory.
This probably would not be the best way to determine if a user exists. Take for example the user root. It exists on all systems, yet most of the time the home directory for the root user in /root instead of /home/root.
Another example would be the rpm user (I'm using this since hindll01 is an RH user). rpm does not have an entry in the /home tree, but does exist.
In the most general case, you don't know how any particular system maintains its list of "recognized users." It could well be using LDAP or Kerberos. The best approach to problems like this is to attempt the operation and to trust the host system to reject a duplicate ... only he knows for sure.
Sorry! it wasn't marked as solved, and I noticed unSpawn, and Jan-Willem Arnold, had posted replies only 2 days shy of 5 years after the original post ( 09-10-04 -> 09-08-09 ). http://www.linuxquestions.org/linux/rules.html never mentions anything about "Necropost" so now that I'm aware of such an unwritten rule as a "Necropost" I'll just start new threads in the future, and make reference to the original post. Cool?