![how to create my own linux os 2017 how to create my own linux os 2017](https://m.media-amazon.com/images/I/61sIlyS5nqL._AC_SY450_.jpg)
Next, remove write permission from the group with the command: sudo chmod -R g-w /READERS First, change the group of the folder with the command: sudo chown -R :readers /READERS Let’s say you have the directory /READERS and you need to allow all members of the readers group access to that directory. Now we’re ready to start managing the users with groups. We’ll add the user olivia to the group editors with the command: sudo usermod -a -G editors olivia We’ll add user nathan to group readers with the command: sudo usermod -a -G readers nathan With our groups created, we need to add our users. If you issue the command less /etc/group, you’ll see our newly created groups listed ( Figure 1 ).įigure 1: Our new groups ready to be used. The commands to create our groups are: addgroup readers addgroup editors Now we’re going to create the groups readers and editors and then add users to them.
How to create my own linux os 2017 password#
When you run each command, you will be prompted to enter (and verify) a new password for each user. To add passwords into the mix, you’d issue the following commands: sudo passwd olivia sudo passwd nathan If you look in the /home directory, you’ll find their respective homes (because we used the -m option, which creates a home directory). To do this, issue the commands: sudo useradd -m olivia sudo useradd -m nathan The first thing we do is create the users. Instead of just simply creating the users we need to create them both with their own home directories and then give them passwords. User creation is handled with the useradd command.
![how to create my own linux os 2017 how to create my own linux os 2017](https://www.maketecheasier.com/assets/uploads/2017/09/create-own-Linux-distro-03-Ubuntu-Imager.jpg)
The first thing we need to do is create the two users for our experiment. If this is the case, you’ll have to first su to the root user to issue the commands that require sudo in the demonstrations. The commands will be universal-the only difference would be if your distribution of choice doesn’t make use of sudo. I’ll be demonstrating on the Ubuntu 16.04 Server platform. This, of course, is very minimal, but it will give you the basic information you need to expand the tasks to fit your much larger needs. The group readers needs to only have read permission to the directory /DATA, whereas the group editors needs to have both read and write permission to the /DATA directory. Olivia needs to be a member of the group editors, while nathan needs to be a member of the group readers. You need to create two users with usernames: We won’t touch on the basics of users, as the focus on this article is about groups.įor the purpose of this piece, I’m going to assume the following: Everything you need to make this happen will be included in your Linux distribution of choice. We’ll start from the beginning with users and work our way to the more complex ACLs.
![how to create my own linux os 2017 how to create my own linux os 2017](https://www.linuxadictos.com/wp-content/uploads/fondo-pantalla-lxa.jpg)
How to create my own linux os 2017 how to#
To make this happen, however, you must first understand how to work with users, via groups and access control lists (ACLs). Say, for example, you have a directory that needs to be accessed with read/write permissions by one group of users and only read permissions for another group. This idea comes to the fore especially when you need to manage permissions for certain users. When you administer a Linux machine that houses multiple users, there might be times when you need to take more control over those users than the basic user tools offer.