As with all OS, we first need to make sure that we can create users. The users are of two types.
- Super Users (Administrators in Windows World) All configurations should be done using this account.
- Normal Users All services, development, browsing should be done using this account.
It's a best practice to not do any development with the root user and have separate account that can be a Super User and another account that can do the normal services or development work.
When a task needs to be done that requires the super user privileges we switch between a super user and the normal user and then switch back to the normal user. Always work with the normal user. Note this concept is new for Windows Users. This is similar to the run as but within the same window you can keep switching users to perform tasks with the corresponding privileges.
When you installed CentOS 7 it would expect you to have the root user and its password. You need to know this before you can create these types of users.
Creating a Super User using SSH Terminal
- Using putty SSH into the CentOS 7 Server using root credentials
- Since you are the root you can give the following command to create the admin user and add him to the root group
- Now we need to change the password
- In order for this user to switch to a super user to perform task the require super user privileges we need to give permission. This is done by using
useradd -g root bigdataadmin
passwd bigdataadmin
Give a strong password.
gpasswd -a bigdataadmin wheel
Creating a Normal User using SSH Terminal
- Using putty SSH into the CentOS 7 Server using the previously created "bigdataadmin" user
- Since this time you are not the root you need to use the following to create the user and the group. Note the use of sudo in front of the command. This stands for "super user do"
- First create the group
- Create the user
- Change the password
sudo groupadd bigdatagroup
It would prompt for a password, enter the password created in the previous step.
sudo useradd -g bigdatagroup bigdatauser
sudo passwd bigdatauser
Note: As with all articles, Open source technologies are sometimes not backward compatible, please check the version number before following this lesson or any lesson on this site.
No comments:
Post a Comment