Tech Junkie Blog - Real World Tutorials, Happy Coding!: Linux CentOS In-Depth: Creating and Adding Users to The developers Group

Monday, January 7, 2019

Linux CentOS In-Depth: Creating and Adding Users to The developers Group

In the previous post we created a user called "John Wallace", in this post we are going to add John and Jason into the developers group.  In any system you want to group users into groups so that you can easily assign constraints and privileges to a group of user instead of doing it one at a time.



To create a group call developers type in the following command:


  1. su to get root access
  2. groupadd developers to add the group developers 





3.  Now we want to assign John and Jason to the developers group, with this command useradd john -G developers and repeat the command with jason

As you can see we used the usermod command instead of the useradd command because john, and jason already exists.


4.  Now let's assign a group to the user on creation using the useradd command useradd -s /bin/bash -d /home/dora -m dora -G developers 

In the command above we added a new user called dora and assigned her to developers group at the same time.  The -G option indicates that we want to assign a default group to the user.

5.  Now to verify we are going to list the members of the developers group with this command grep 'developers' /etc/group this command searches for entry for the developers group in the /etc/group file



6.  Now let's say John is a bad developer and always brings down the server with his infinite loops.  We can use this command to remove John from the developers group gpasswd -d john developers










5 comments:

  1. Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.
    Advanced AWS Training in Bangalore | Best Amazon Web Services Training Institute in Bangalore
    Advanced AWS Training Institute in Pune | Best Amazon Web Services Training Institute in Pune
    Advanced AWS Online Training Institute in india | Best Online AWS Certification Course in india
    AWS training in bangalore | Best aws training in bangalore

    ReplyDelete
  2. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.
    microsoft azure training in bangalore
    rpa training in velachery| rpa training in tambaram |rpa training in sholinganallur | rpa training in annanagar| rpa training in kalyannagar

    ReplyDelete
  3. Thanks for splitting your comprehension with us. It’s really useful to me & I hope it helps the people who in need of this vital information. 
    Best Devops online Training
    Online DevOps Certification Course - Gangboard

    ReplyDelete
  4. That was a great message in my carrier, and It's wonderful commands like mind relaxes with understand words of knowledge by information's.
    python Course in Pune
    python Course institute in Chennai
    python Training institute in Bangalore

    ReplyDelete
  5. Both Windows and Linux VPS hosting are good but make sure that you have the right tools in place to install all the software and run the operating system perfectly. Linux VPS

    ReplyDelete