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.
Distribution: REDHAT, FEDORA,SUSE, UBUNTU, ORACLE ENTERPRISE LINUX & SOLARIS 10
By default every user will have his primary group & if no group name is mentioned while creating the user then default primary group is same as his username.
Secondary group is used when multiple people have to work on a same project & they require similar access to a particular folder.
i.e all people from group abc are accessing folder1 then we can give permissions rwx as per needs to the group of the folder no need to give permission to others, but abc should be the default group for that folder.
If you do ls -l in a directory, you'll see something like this:
-rw-r--r-- 1 user group 5120 2009-05-13 19:30 filename
- user being the user who ones the file, group indicating the primary group the user belongs to - on most systems, it defaults to the user's own group (i.e. it's the same as user, but that depends on what you do when using "-g"). The groups you add with "-G" are supplementary - they're needed to grant additional rights to a user. There's a default set of supplementary groups for new users to enable them to do basic task, e.g. printing or using media or storage devices.
if no group name is mentioned while creating the user then default primary group is same as his username.
That depends on the distro that is used. Historically the group users is used, not the name of the user, although I know that Red Hat (and offspring?) use the username as groupname. Don't get me wrong, it is, from a safety point of view, a good thing.
Indeed, an unspecified primary group must default to something.
Historically it would have been 'users' (druuna) or maybe 'others' (saagar) or ...
RedHat decided sometime ago that for enhanced security it should default such that the group id was the same as the user id eg 1st user is usually 500:500, then 501:501 and so on.
RH derived systems tend to do the same. Other distros may also do this.
Yep, I apologize for my over-generalisation - I'm used to Debian (based) systems, which default to "username usernameasgroupname", but I acknowledge that this is a questions of defaults or settings, repectively.