9

Why is it that when I provide a username during the installation process for Ubuntu, that a new group is created with that name too?

Is there a reason we're not just plain Administrators?

Flyk
  • 1,480
user541686
  • 4,167

3 Answers3

5

Being an administrator just opens up a bunch of other options to you as a user (they are mostly unimportant), but it won't really change anything.

By default, the first user (the one you create from the installer) is an administrator (essentially) with some options disabled for safety. The reason everyone gets a separate group is simply because it makes it easier to manage permissions (on a Unix) system in this way.

RolandiXor
  • 51,541
  • So if I want to add another user like myself, do I (1) add them ad Adminstrator, (2) add them as , or (3) create a new group for them with their own name, or (4) do something else? None of these makes sense to me. :( – user541686 May 21 '11 at 22:56
  • @Mehrdad, when you add a new user, a group is automatically created for them, and you can choose what type of user they are. Normally, you would choose desktop user. – RolandiXor May 21 '11 at 23:00
  • @Roland: Wait, I'm confused -- what's the difference between a group and a kind of user? Are you saying you can be in the root group but be a Desktop User at the same time? – user541686 May 21 '11 at 23:02
  • @Mehrdad a group is just that: a group. A kind of a user is, well, let's say, a definition of the things that the user in question can and cannot do. For example, if you are an administrator, you can add other users and do things root can do. If you are part of the printer group, you can use printers... if you are not part of the group then you cannot. – RolandiXor May 21 '11 at 23:05
  • @Roland: This is so different from Windows, it's confusing the heck out of me, haha. In Windows, groups and "kinds of users" are synonymous. Sorry if this is a bit off-topic, but how many "kinds of users" are there then? Is there a text file where I can set the kinds of users manually? – user541686 May 21 '11 at 23:06
  • @Mehrdad... I'm close to throwing my hands in the air and saying I give up :)!

    In windows, groups are not kinds of users, they are just groups. Groups do what it says on the tin, they "group" users together, so then you can apply something (like a setting) to a whole group. The "kinds of users" that you can have is in a technical sense unlimited, but for the purposes of this question, there are really essentially about 3. First there are normal users (representing real people, with a /home/username), then there are virtual users (like samba's guest account), and then there is root -->

    – RolandiXor May 21 '11 at 23:13
  • which is the system itself... – RolandiXor May 21 '11 at 23:14
  • @Eoland: I can say for certain that on Windows, "groups" do more than just "group" users. They also specify the permissions that the user has; they're not "just groups". There are no "kinds of users" either in Windows -- your group determines what "kind of user" you are. So that's why I'm confused a bit. :\ – user541686 May 21 '11 at 23:27
  • @Roland: Technically the name "root" carries no powers with it. It's only the UID 0 that is the super user. By default, this is mapped to the username "root". – Hello71 May 21 '11 at 23:52
  • @Hello71, I said root is the system (aka super user) so what was the point of your comment :)? – RolandiXor May 21 '11 at 23:56
1

This is necessary because of Linux file system rights. Linux (and other Unix variants) have a right setting for 3 types of users: a owner, a owning group and "others" (i.e. someone who's not the owner and not in the owning group). All files (on linux filesystems) are obliged to have a owner and owning group.

Since usually files that are created by a user are meant for that user only the owner is set to the user and the owning group is set to a special group the user belongs to: the group with the user its name. Thats why such a group is created whenever a new user is created.

dtech
  • 111
  • So that means the Administrator and Desktop User groups are pretty much useless? (Edit: Apparently those aren't "groups" at all, I'm so confused...) – user541686 May 21 '11 at 23:05
0

There is you, root (admin), and everyone else. You're automatically added to sudoers and can perform as root(admin) via sudo because of your group status. Root and Administrator are pretty synonymous.

Ubuntu wants to make it easy for users to get up and running without having to install and configure all that stuff.

EDIT: Read RootSudo

wojox
  • 11,362
  • 2
    @wojox: Hm... I'm not sure I quite understand what you mean. I've posted a screenshot; I'm wondering why the second option isn't selected? – user541686 May 21 '11 at 22:41
  • Second option is selected. Open a terminal and type: groups – wojox May 21 '11 at 23:11
  • You'll notice your in the admin group as well. – wojox May 21 '11 at 23:14
  • @wojox: But I'm also in other groups, which begs my question of "why"? Would I lose something if I was just an admin? – user541686 May 21 '11 at 23:27
  • You could loose alot by just running as Admin aka root. It's not good practice. – wojox May 21 '11 at 23:30
  • @wojox: Are you saying that "Admin" is the same as "root"? – user541686 May 21 '11 at 23:33
  • Not quite the same, but when you have Admin privileges you have root privileges. That's just the hierarchy. It is a lot different from Windows but it's a lot more secure as well. There are distro like Arch which I use where you set up everything manually from the commandline. Ubuntu has really made it a lot simpler I know it's pretty weird at first. Read RootSudo and it may explain more. – wojox May 22 '11 at 00:39
  • @wojox: "Root privileges" means "being able to do whatever root can", which to me means "running dangerous programs without needing sudo". Does that mean if I add myself to the Admins group, I won't need sudo anymore? – user541686 May 22 '11 at 00:41
  • You should already be in the Admin group. There are many options. You can disable the password for sudo. You can enable the root account. You can disable sudo altogether but you still need to drop into a root account to do anything. – wojox May 22 '11 at 00:47