<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>red hat Linux - Techyaz.com</title>
	<atom:link href="https://techyaz.com/tag/red-hat-linux/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Tips, Tutorials and How-to Topics</description>
	<lastBuildDate>Fri, 01 Jun 2018 12:06:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>

<image>
	<url>https://techyaz.com/wp-content/uploads/2017/11/cropped-Site-icon-150x150.png</url>
	<title>red hat Linux - Techyaz.com</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Linux User Administration &#8211; Add, Delete &#038; Modify User Accounts</title>
		<link>https://techyaz.com/linux/linux-user-administration-add-delete-modify-user-accounts/</link>
					<comments>https://techyaz.com/linux/linux-user-administration-add-delete-modify-user-accounts/#respond</comments>
		
		<dc:creator><![CDATA[Angelo Marquez]]></dc:creator>
		<pubDate>Mon, 12 Mar 2018 10:41:35 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[RedHat Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[red hat Linux]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[user]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1906</guid>

					<description><![CDATA[<p>In IT’s World, it is common to hear about system users, especially if you work in the administration of systems under that environment. GNU/LINUX is a multiuser and reliable operating system in terms of security, but it is always good&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/linux/linux-user-administration-add-delete-modify-user-accounts/">Linux User Administration &#8211; Add, Delete &#038; Modify User Accounts</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In IT’s World, it is common to hear about system users, especially if you work in the administration of systems under that environment. GNU/LINUX is a multiuser and reliable operating system in terms of security, but it is always good to know the basics of managing system users. Well, today we&#8217;ll be talking about creating, modifying and deleting users in the GNU/LINUX systems. Here, i will explain how to add user to Linux and Modify or remove user to Linux machine.</p>
<h3><span style="color: #333399;">USERS IN GNU/LINUX<strong> </strong></span></h3>
<p>The first thing we need to know is that, in GNU/LINUX there are different types of users already predefined and each of them have different characteristics for the correct functioning of the system. The first of these is the <strong>root</strong> user.</p>
<p><strong>Root user</strong></p>
<p>The Root user is the administrator of the operating system, with all options and permissions to perform operations and changes in the system. Its main features are:</p>
<ul>
<li>It is the only user account with system-wide privileges.</li>
<li>In charge of controlling the administration of user accounts.</li>
<li>It is the only user that can stop the system.</li>
<li>The root user can install, uninstall and update basic system programs and libraries.</li>
</ul>
<p>In other words, the root user is the all-powerful user of the system.</p>
<p><strong>Special Users</strong><strong> </strong></p>
<p>They are also called users without login. Their roles in the system are determined by the addition of installed programs. They are distinguished by:</p>
<ul>
<li>They are created (usually) automatically at the time of Linux or application installation.</li>
<li>It does not have all the privileges of the root user, but depending on the account they assume different root privileges.</li>
<li>They are created when installing the system or any of its extra components.</li>
<li>Some of them are: bin, daemon, adm, lp, sync, shutdown, mail, operator, squid, apache</li>
</ul>
<p><strong>Common Users</strong><strong> </strong></p>
<p>These last users are us. That is, they are accounts that are created to use all accessible parts of the system, such as assigned programs and directories. They have a Home directory where they can easily access their documents and files.</p>
<ul>
<li>Such users have only full privileges in their working directory or HOME.</li>
<li>They are used for individual users.</li>
<li>These users do not have privileges to manage the system or install software.<strong> </strong></li>
</ul>
<h5><span style="color: #993300;"><strong>How to Create or Add USERS TO Linux Systems?</strong></span></h5>
<p>The adduser command is a &#8220;new&#8221; alternative to the useradd binary that allows us to add common users to our GNU/LINUX distribution. It is much more &#8220;friendly&#8221; and intuitive than useradd and allows us to add additional information about the new user. Here we will learn how to create user on Linux system.</p>
<p>In order to use the adduser command we must be root users, for that reason write the following command in a terminal</p>
<pre><span style="color: #008000;"><strong>#Connect using su.</strong></span>
<span style="color: #0000ff;"><strong>su</strong></span></pre>
<p><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-1907" src="http://techyaz.com/wp-content/uploads/2018/03/1-su-min.png" alt="" width="648" height="110" srcset="https://techyaz.com/wp-content/uploads/2018/03/1-su-min.png 648w, https://techyaz.com/wp-content/uploads/2018/03/1-su-min-300x51.png 300w" sizes="(max-width: 648px) 100vw, 648px" /></p>
<p>You need to write the root password then we can use adduser. The most basic way to use the adduser command is:</p>
<pre><span style="color: #0000ff;"><strong>adduser new_user</strong><strong> </strong></span></pre>
<p>where new_user is the name of user account. With this &#8220;basic&#8221; form a new user is created and by giving Enter we are asked to enter the new password for this new user account.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1908" src="http://techyaz.com/wp-content/uploads/2018/03/2-adduser-min.png" alt="Add Linux User" width="599" height="191" srcset="https://techyaz.com/wp-content/uploads/2018/03/2-adduser-min.png 599w, https://techyaz.com/wp-content/uploads/2018/03/2-adduser-min-300x96.png 300w" sizes="(max-width: 599px) 100vw, 599px" /></p>
<p>Type the password for your new user account and press Enter. Prompt will ask you to reenter the same password. Re-enter the password and press enter button.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1909" src="http://techyaz.com/wp-content/uploads/2018/03/3-enter-password-min.png" alt="Set Password for New User in Linux" width="567" height="193" srcset="https://techyaz.com/wp-content/uploads/2018/03/3-enter-password-min.png 567w, https://techyaz.com/wp-content/uploads/2018/03/3-enter-password-min-300x102.png 300w" sizes="(max-width: 567px) 100vw, 567px" /></p>
<p>After that you will be asked for any additional information such as Full Name, phone number etc.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1910" src="http://techyaz.com/wp-content/uploads/2018/03/4-fullName-min.png" alt="Enter User Account Details" width="588" height="244" srcset="https://techyaz.com/wp-content/uploads/2018/03/4-fullName-min.png 588w, https://techyaz.com/wp-content/uploads/2018/03/4-fullName-min-300x124.png 300w" sizes="auto, (max-width: 588px) 100vw, 588px" /></p>
<p>At the end, prompt will ask us to confirm the information provided. Type Y to proceed if all information is correct.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1911" src="http://techyaz.com/wp-content/uploads/2018/03/5-enter-details-min.png" alt="Enter User Details" width="587" height="343" srcset="https://techyaz.com/wp-content/uploads/2018/03/5-enter-details-min.png 587w, https://techyaz.com/wp-content/uploads/2018/03/5-enter-details-min-300x175.png 300w" sizes="auto, (max-width: 587px) 100vw, 587px" /></p>
<p>Now, as mentioned above, that is the most basic way to create a user but adduser also has options and alternatives to create users. These alternatives are given by the options that can be added to the command, some of them are:</p>
<pre><strong><span style="color: #0000ff;">adduser [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID]</span></strong>
<strong><span style="color: #0000ff;">[--firstuid ID] [--lastuid ID] [--gecos GECOS] [--ingroup GROUP | --gid ID]</span></strong>
<strong><span style="color: #0000ff;">[--disabled-password] [--disabled-login] [--add_extra_groups] USER

</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1912" src="http://techyaz.com/wp-content/uploads/2018/03/6-adduser-options-min.png" alt="Add Linux User options" width="691" height="562" srcset="https://techyaz.com/wp-content/uploads/2018/03/6-adduser-options-min.png 691w, https://techyaz.com/wp-content/uploads/2018/03/6-adduser-options-min-300x244.png 300w" sizes="auto, (max-width: 691px) 100vw, 691px" /></p>
<p>You can see various options available with adduser command in above screenshot. Let&#8217;s look at example. If you would like to add a user named <em>angelob</em>, and set their home directory to <em>/opt/angelob/</em> the the command will be as follows.</p>
<pre><strong><span style="color: #0000ff;">adduser --home /opt/angelob/ angelob</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1913" src="http://techyaz.com/wp-content/uploads/2018/03/7-adduser-min.png" alt="Add User" width="634" height="192" srcset="https://techyaz.com/wp-content/uploads/2018/03/7-adduser-min.png 634w, https://techyaz.com/wp-content/uploads/2018/03/7-adduser-min-300x91.png 300w" sizes="auto, (max-width: 634px) 100vw, 634px" /></p>
<p>And then it will ask us for the new password and basic user information. This way you can add user to Linux system.</p>
<h5><span style="color: #993300;"><strong>How to Delete Linux User Accounts?</strong></span><strong> </strong></h5>
<p>As in above section we have learnt how to create user on Linux system. Here i will explain how remove user from Linux system. Removing users from the Linux system is simple and the command to do so is <em><strong>userdel</strong></em> and has many fewer options to make the task. You can see the descriptions for this command in below image.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1914" src="http://techyaz.com/wp-content/uploads/2018/03/8-deleteuser-min.png" alt="Delete Linux User" width="704" height="254" srcset="https://techyaz.com/wp-content/uploads/2018/03/8-deleteuser-min.png 704w, https://techyaz.com/wp-content/uploads/2018/03/8-deleteuser-min-300x108.png 300w" sizes="auto, (max-width: 704px) 100vw, 704px" /></p>
<p>The easiest way to delete a user is to remove it by running below command. Here user is the name of user account.</p>
<pre><span style="color: #0000ff;"><strong><span style="color: #008000;">#user is the name of user account.</span>
userdel user</strong></span></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1915" src="http://techyaz.com/wp-content/uploads/2018/03/9-deleteuser-min.png" alt="Remove Linux User" width="605" height="103" srcset="https://techyaz.com/wp-content/uploads/2018/03/9-deleteuser-min.png 605w, https://techyaz.com/wp-content/uploads/2018/03/9-deleteuser-min-300x51.png 300w" sizes="auto, (max-width: 605px) 100vw, 605px" /></p>
<p>We can also delete your entire personal directory with the -r option. Run below command to do this.</p>
<pre><span style="color: #0000ff;"><strong>userdel -r user</strong></span></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1916" src="http://techyaz.com/wp-content/uploads/2018/03/10-userdeletion-min.png" alt="Drop Linux user" width="629" height="98" srcset="https://techyaz.com/wp-content/uploads/2018/03/10-userdeletion-min.png 629w, https://techyaz.com/wp-content/uploads/2018/03/10-userdeletion-min-300x47.png 300w" sizes="auto, (max-width: 629px) 100vw, 629px" /></p>
<h5><span style="color: #993300;"><strong>How to Modify Linux User Accounts?</strong><strong> </strong></span></h5>
<p>I have shown how to remove Linux user  in above section. Here, i will explain how to modify a Linux user. To modify users in the GNU/LINUX system we use the command <strong><em>usermod</em></strong>. We can see in the following image the possibilities shown in command:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1917" src="http://techyaz.com/wp-content/uploads/2018/03/11-modifyuser-min.png" alt="Modify Linux User" width="705" height="572" srcset="https://techyaz.com/wp-content/uploads/2018/03/11-modifyuser-min.png 705w, https://techyaz.com/wp-content/uploads/2018/03/11-modifyuser-min-300x243.png 300w" sizes="auto, (max-width: 705px) 100vw, 705px" /></p>
<p>For example, if we wanted to change the password of a created user, it would be as follows.</p>
<pre><span style="color: #008000;"><strong>#user is the name of Linux user account.</strong></span>
<span style="color: #0000ff;"><strong>usermod -p ‘new_password’ user</strong></span></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1918" src="http://techyaz.com/wp-content/uploads/2018/03/12-modifyuser-min.png" alt="modify linux users" width="654" height="109" srcset="https://techyaz.com/wp-content/uploads/2018/03/12-modifyuser-min.png 654w, https://techyaz.com/wp-content/uploads/2018/03/12-modifyuser-min-300x50.png 300w" sizes="auto, (max-width: 654px) 100vw, 654px" /></p>
<p>Obviously this method is not recommended because it leaves the password visible. Be careful. Read below article if you want to change your Linux user account password.</p>
<ul>
<li><strong><a href="http://techyaz.com/rhel/how-to-reset-or-change-user-password-on-linux/" target="_blank" rel="noopener">How to Reset or Change User Password on RHEL?</a></strong></li>
</ul>
<p>Another useful example is to move the personal folder of the desired user to another one, for it we must combine the options -d and -m in the following way.</p>
<p><span style="color: #0000ff;"><strong>usermod -d /opt/angelob1/ -m angelob</strong></span></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1919" src="http://techyaz.com/wp-content/uploads/2018/03/13-modifyuser-min.png" alt="Modify Linux user" width="619" height="107" srcset="https://techyaz.com/wp-content/uploads/2018/03/13-modifyuser-min.png 619w, https://techyaz.com/wp-content/uploads/2018/03/13-modifyuser-min-300x52.png 300w" sizes="auto, (max-width: 619px) 100vw, 619px" /></p>
<p>With the rest of the options, we only have to place them according to our needs.</p>
<p>In conclusion we can say that the administration of GNU/LINUX users is a matter for system administrators, the subject is wide and with many options to take into account for the creation of them.</p>
<p><em>Adduser</em> simplifies the creation of user accounts and <em>usermod</em> allows us to modify them in a very fast and dynamic way. And if a user has already completed his life cycle in the system, we can remove it with <em>userdel</em>.</p>
<p>I hope this small guide has been useful to understand a little bit about GNU/LINUX users, clarifying that the commands explained in the article can be used in all popular distributions such as Ubuntu, Red Hat, Suse, Debian and others.<br />
I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><em><span style="color: #800000;"><strong>Read More:</strong></span></em></p>
<ul>
<li><strong><a href="http://techyaz.com/rhel/red-hat-enterprise-linux-interview-questions-answers/" target="_blank" rel="noopener">RHEL Interview Questions and Answers</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-on-linux/change-hostname-red-hat-linux-server/" target="_blank" rel="noopener">How to Change Hostname of RHEL system?</a></strong></li>
<li><strong><a href="http://techyaz.com/rhel/install-htop-monitor-linux-processes/" target="_blank" rel="noopener">How to Install and Use Htop to Monitor Linux Processes?</a></strong></li>
<li><strong><a href="http://techyaz.com/debian/how-to-install-debian-9-stretch/" target="_blank" rel="noopener">Install Debian 9 Stretch in Step by Step Process</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/linux/linux-user-administration-add-delete-modify-user-accounts/">Linux User Administration &#8211; Add, Delete &#038; Modify User Accounts</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/linux/linux-user-administration-add-delete-modify-user-accounts/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Red Hat Enterprise Linux Interview Questions and Answers</title>
		<link>https://techyaz.com/interview-questions/redhat-linux-interview-questions/red-hat-enterprise-linux-interview-questions-answers/</link>
					<comments>https://techyaz.com/interview-questions/redhat-linux-interview-questions/red-hat-enterprise-linux-interview-questions-answers/#respond</comments>
		
		<dc:creator><![CDATA[Angelo Marquez]]></dc:creator>
		<pubDate>Mon, 26 Feb 2018 09:32:20 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[RedHat Linux]]></category>
		<category><![CDATA[RedHat Linux Interview Questions]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Interview Questions]]></category>
		<category><![CDATA[Linux Interview Questions and Answers]]></category>
		<category><![CDATA[red hat Linux]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1901</guid>

					<description><![CDATA[<p>When we talk about GNU/LINUX distributions we find a big collection of them, which can cover practically all the needs in almost all areas. Some of them range from simple home use to commercial production. The GNU/LINUX distribution that we&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/interview-questions/redhat-linux-interview-questions/red-hat-enterprise-linux-interview-questions-answers/">Red Hat Enterprise Linux Interview Questions and Answers</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>When we talk about GNU/LINUX distributions we find a big collection of them, which can cover practically all the needs in almost all areas. Some of them range from simple home use to commercial production. The GNU/LINUX distribution that we will be talking about not only has a great impact on the &#8220;penguin&#8221; world, but also on the business sector is an obligatory reference because of its stability, commercial support and solutions applied to the cloud. Welcome to Red Hat Enterprise Linux. This article is about Red Hat Enterprise Linux Interview Questions and Answers that will help you to crack your technical round of Linux interviews.</p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-1902 alignright" src="http://techyaz.com/wp-content/uploads/2018/02/RHEL-InterviewQA.png" alt="Red Hat Linux Interview Questions and Answers" width="300" height="300" srcset="https://techyaz.com/wp-content/uploads/2018/02/RHEL-InterviewQA.png 300w, https://techyaz.com/wp-content/uploads/2018/02/RHEL-InterviewQA-150x150.png 150w, https://techyaz.com/wp-content/uploads/2018/02/RHEL-InterviewQA-160x160.png 160w, https://techyaz.com/wp-content/uploads/2018/02/RHEL-InterviewQA-320x320.png 320w" sizes="auto, (max-width: 300px) 100vw, 300px" /></p>
<h3><span style="color: #333399;">Red Hat Linux Interview Questions and Answers</span></h3>
<p><strong>1. What is Red Hat Enterprise Linux?</strong></p>
<p><strong>Answer &#8211;</strong> It is a GNU/LINUX distribution created and developed by the multinational enterprise oriented company Red Hat, being the basis for deploying cloud applications, servers or data center.</p>
<p><strong>2. Which is the package manager used by RHEL?</strong></p>
<p><strong>Answer &#8211;</strong> The package manager in RHEL is YUM.</p>
<p><strong>3. How do I install a program in RHEL?</strong></p>
<p><strong>Answer &#8211;</strong> Installing a package or program in RHEL is simple thanks to YUM. With root permission we type in a terminal.</p>
<pre><strong><span style="color: #0000ff;">yum install package_name</span></strong></pre>
<p><strong>4. How can I update the packages in RHEL?</strong></p>
<p><strong>Answer &#8211;</strong> Run below command to update all packages in your RHEL system.</p>
<pre><strong><span style="color: #0000ff;">yum upgrade</span></strong></pre>
<p><strong>5. How can I remove the packages in RHEL?</strong></p>
<p><strong>Answer &#8211;</strong> Run below command to remove any package from RedHat Linux system.</p>
<pre><span style="color: #008000;"><strong>#Make sure to change the name of package that needs to be removed.</strong></span>
<strong><span style="color: #0000ff;">yum remove package_name</span></strong></pre>
<p><strong>6. How can I create a user in RHEL?</strong></p>
<p><strong>Answer &#8211;</strong> We can create a new user from the terminal with the command:</p>
<pre><strong><span style="color: #008000;">#Pass the user name in place of user_name </span></strong>
<span style="color: #0000ff;"><strong>useradd user_name</strong></span></pre>
<p><strong>7. How can I change the user password?</strong></p>
<p><strong>Answer &#8211;</strong> The command that allows us to change the password of the active user is <em><strong>passwd</strong></em>. By entering the command in the terminal, you will be prompted for the current password and twice for the new password. Read below article to learn step by step process to change user as well as sudo passwords.</p>
<ul>
<li><strong><a href="http://techyaz.com/rhel/how-to-reset-or-change-user-password-on-linux/" target="_blank" rel="noopener">How to Reset or Change User Password on RHEL?</a></strong></li>
</ul>
<p><strong>8. How can I change the system language?</strong></p>
<p><strong>Answer-</strong> In RHEL, the system language can be changed using the following command:</p>
<pre><strong><span style="color: #0000ff;">localectl set-locale LANG=”xx_XX.utf8”</span></strong></pre>
<p>For example, if the system is in English and we want to change to German</p>
<pre><strong><span style="color: #0000ff;">localectl set-locale LANG=de_DE.utf8</span></strong></pre>
<p>Then simply restart the active session (not the system)</p>
<p><strong>9. What is a GNU/LINUX service?</strong></p>
<p><strong>Answer &#8211;</strong> A service is a program that runs in the background, outside the interactive control of the users of the system.</p>
<p><strong>10. How can I list the services that are running in RHEL?</strong></p>
<p><strong>Answer &#8211;</strong> This is very useful when managing systems in GNU/LINUX. We can list all the services that are running with the command:</p>
<pre><strong><span style="color: #0000ff;">systemctl -t service --state=active</span></strong></pre>
<p>If you want to check specific service running on RHEL then you can pass service name in above command. For example, i want to check SQL Server service running on my RHEL system then i will run below command. This command will show the output for only this service.</p>
<pre><strong><span style="color: #0000ff;">systemctl status mssql-server</span></strong></pre>
<p><strong>11. How can I start or stop a service?</strong></p>
<p><strong>Answer &#8211;</strong> During the administration of a GNU/LINUX based server we will have to initialize and also stop services.</p>
<p>To initialize:</p>
<pre><strong><span style="color: #0000ff;">systemctl start name.service </span></strong></pre>
<p>To Stop:</p>
<pre><strong><span style="color: #0000ff;">systemctl stop name.service</span></strong></pre>
<p>To Restart:</p>
<pre><strong><span style="color: #0000ff;">systemctl restart name.service</span></strong></pre>
<p><strong>12. How do I know which version of the kernel I am using?</strong></p>
<p><strong>Answer &#8211;</strong> To know which version of the Linux Kernel we are using, just use the command:</p>
<pre><strong><span style="color: #0000ff;">uname –r</span></strong></pre>
<p><strong>13. How can I add and remove kernel modules?</strong></p>
<p><strong>Answer &#8211;</strong> The kernel modules are small programs or libraries that are added to the kernel so that it can manage hardware devices. To add or remove it we use the command modprobe.</p>
<p>For example, to add a module:</p>
<pre><strong><span style="color: #0000ff;">modprobe module_name</span></strong></pre>
<p>And to remove a module</p>
<pre><strong><span style="color: #0000ff;">modprobe –r module_name</span></strong></pre>
<p><strong>14. What is the file system RHEL uses?</strong></p>
<p><strong>Answer &#8211;</strong> The file system used by RHEL is XFS</p>
<p><strong>15. How do I know how much space is available on my hard disk with RHEL?</strong></p>
<p><strong>Answer &#8211;</strong> This is useful to know when we are reaching the hard disk capacity. With the command:</p>
<pre><strong><span style="color: #0000ff;">df –h</span></strong></pre>
<p><strong>16. Can I change hostname in RHEL?</strong></p>
<p><strong>Answer &#8211;</strong> Yes. There are multiple ways to change hostname of a RHEL system. For example if we want hostname to be example. com, we must write the following command in a terminal:</p>
<pre><strong><span style="color: #0000ff;">hostnamectl set-hostname example.com
</span></strong></pre>
<p>I have explained it in below article in very details way. Have a look at this article to learn the process to rename or change the hostname of RHEL system.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-on-linux/change-hostname-red-hat-linux-server/" target="_blank" rel="noopener">How to Change Hostname of RHEL system?</a></strong></li>
</ul>
<p><strong>17. How do I know the IP address of the equipment in RHEL?</strong></p>
<p><strong>Answer &#8211;</strong> With the command:</p>
<pre><strong><span style="color: #0000ff;">nmcli dev show</span></strong></pre>
<p>We will not only be able to see the ip address, but also the complete information of all the network interfaces. You can read below article to learn how to check and change the IP address, subnet mask etc of a RHEL system.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-on-linux/check-change-ip-address-subnet-mask-default-gateway-linux-server/" target="_blank" rel="noopener">How to Find and Change IP Address, Subnet Mask and Default Gateway of RHEL system?</a></strong></li>
</ul>
<p><strong>18. Can I install a Web server in RHEL?</strong></p>
<p><strong>Answer-</strong> Of course, we can install the web server we want: Apache, nGix or other.</p>
<p><strong>19. After installing Apache2, where is the default Document Root located?</strong></p>
<p><strong>Answer &#8211;</strong> By default the apache2 DocumentRoot in RHEL sets it to /var/www/html/</p>
<p><strong>20. How do I know which version of Red Hat Enterprise Linux is running the server?</strong></p>
<p><strong>Answer &#8211;</strong> Run the command in a terminal to get the RHEL version running on your system.</p>
<pre><strong><span style="color: #0000ff;">/etc/redhat-release</span></strong></pre>
<p>I hope you like this set of Linux Interview Questions and Answers. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/interview-questions/redhat-linux-interview-questions/red-hat-enterprise-linux-interview-questions-answers/">Red Hat Enterprise Linux Interview Questions and Answers</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/interview-questions/redhat-linux-interview-questions/red-hat-enterprise-linux-interview-questions-answers/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Install Htop and Use it to Monitor Linux Processes?</title>
		<link>https://techyaz.com/linux/install-htop-monitor-linux-processes/</link>
					<comments>https://techyaz.com/linux/install-htop-monitor-linux-processes/#respond</comments>
		
		<dc:creator><![CDATA[Angelo Marquez]]></dc:creator>
		<pubDate>Tue, 20 Feb 2018 08:16:55 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Tools]]></category>
		<category><![CDATA[RedHat Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Htop]]></category>
		<category><![CDATA[red hat Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1880</guid>

					<description><![CDATA[<p>Generally, we run lot of commands to get informations for Linux processes. We can use a tool name Htop to avoid running multiple commands and get lot of valuable information in one screen. Htop is an interactive process viewer tool&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/linux/install-htop-monitor-linux-processes/">How to Install Htop and Use it to Monitor Linux Processes?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Generally, we run lot of commands to get informations for Linux processes. We can use a tool name Htop to avoid running multiple commands and get lot of valuable information in one screen. Htop is an interactive process viewer tool for Linux systems that will show all processes in a Task Manager without wasting resources. Here, i will show you how to install Htop and its uses to monitor the Linux processes.</p>
<p><a href="http://hisham.hm/htop/">HTOP</a> is a process viewer on the terminal created for the entire Unix family but has great popularity within GNU/LINUX. The main advantages of this tool are that we can monitor processes, finalize and explore them all from the terminal which guarantees a minimum expenditure of resources.</p>
<p>&nbsp;</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1882" src="http://techyaz.com/wp-content/uploads/2018/02/1-htop-min.jpg" alt="htop screen" width="480" height="360" srcset="https://techyaz.com/wp-content/uploads/2018/02/1-htop-min.jpg 480w, https://techyaz.com/wp-content/uploads/2018/02/1-htop-min-300x225.jpg 300w" sizes="auto, (max-width: 480px) 100vw, 480px" /></p>
<h3><span style="color: #333399;">How to Install Htop on Various Linux Systems?</span></h3>
<p>We can install Htop from your sources or simply from pre-compiled packages. However, Htop is found in most GNU/LINUX distributions through its main repositories. Please have a look at the step by step process to install Htop on Debian, RHEL, Ubuntu and other Linux systems.</p>
<h5><span style="color: #993300;">Install Htop on Debian 8 Jessie and Debian 9 Stretch</span></h5>
<p>The first thing we need to do is login as root. Type <em><strong>su</strong></em> on your terminal window and press enter followed by typing its password.</p>
<pre><span style="color: #0000ff;"><strong>su</strong></span></pre>
<p>Once you will be connected using su account, run below command to install Htop on Debian systems.</p>
<pre><span style="color: #0000ff;"><strong>apt install htop</strong></span></pre>
<h5><span style="color: #993300;">Install Htop on Ubuntu 14.04  and Ubuntu 16.04</span></h5>
<p>Here, I will show you how to install Htop on Ubuntu servers. Installation of htop on Ubuntu is very much similar to installing it on Debian as we did in above section. In the case of Ubuntu, we must be root user to install htop. Type su and press enter followed by its password.</p>
<pre><span style="color: #0000ff;"><strong>su</strong></span></pre>
<p>Once we will be connected using root user, we will proceed to install htop on Ubuntu by running below commands. A set of execution will start and execution will finish with its installation.</p>
<pre><span style="color: #0000ff;"><strong>apt install htop</strong></span></pre>
<h5><span style="color: #993300;">Install Htop on Fedora 26 and Fedora 27</span></h5>
<p>There is little different way to install Htop on Fedora systems as we use dnf command to install it on fedora. Fedora users can easily install htop as following below steps. First we connect to root privileges using su account. Type su and its password.</p>
<pre><span style="color: #0000ff;"><strong>su</strong></span></pre>
<p>Once we will be connected using <strong>su</strong> account, we can invoke <strong>dnf</strong> which is Fedora package manager. Run below dnf command to install htop on Fedora systems. A set of execution will start and finish with htop installation.</p>
<pre><span style="color: #0000ff;"><strong>dnf install htop</strong></span></pre>
<h5><span style="color: #993300;">Install Htop on Gentoo</span></h5>
<p>For Gentoo we must also be root users. Write in a terminal:</p>
<pre><span style="color: #0000ff;"><strong>su</strong></span></pre>
<p>Once we connected with root user permissions, we can install Htop by invoking Gentoo&#8217;s own package manager emerge. Run below command to start Htop installation on Gentoo system. A series of execution will start and finish with its installation.</p>
<pre><span style="color: #0000ff;"><strong>emerge sys-process/htop</strong></span></pre>
<h5><span style="color: #993300;">Install Htop on CentOS 7 and Red Hat Linux Enterprise</span></h5>
<p>In the case of CentOS 7, we must first add the EPEL repository and then install it normally. First we logged in as root user to get installation privileges. Connect using su account by typing below command and its password.</p>
<pre><span style="color: #0000ff;"><strong>su</strong></span></pre>
<p>Once logged in as root user, we proceed to download the package containing the EPEL repository:</p>
<pre><span style="color: #0000ff;"><strong>wget http://mirror.pnl.gov/epel/7/x86_64/e/epel-release-7-5.noarch.rpm</strong></span></pre>
<p>And then install the downloaded package to add the EPEL repository:</p>
<pre><span style="color: #0000ff;"><strong>rpm -Uvh epel-release-7-5.noarch.rpm</strong></span></pre>
<p>The next step is to &#8220;validate&#8221; the newly added repository by running below command.</p>
<pre><span style="color: #0000ff;"><strong>yum repolist</strong></span></pre>
<p>And Finally we will install htop on RHEL and Centos by running below command.</p>
<pre><span style="color: #0000ff;"><strong>yum install htop</strong><strong> </strong></span></pre>
<h3><span style="color: #333399;">Basic use of HTOP</span></h3>
<p>We have installed Htop on various Linux systems in above section. We must write the command htop To launch it. Here, it is not necessary to do it as root user. You can see i wrote htop on terminal window and press enter to get the Htop task manager screen in below image.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1883" src="http://techyaz.com/wp-content/uploads/2018/02/2-Htop-command-min.png" alt="Type htop to launch its screen" width="700" height="145" srcset="https://techyaz.com/wp-content/uploads/2018/02/2-Htop-command-min.png 700w, https://techyaz.com/wp-content/uploads/2018/02/2-Htop-command-min-300x62.png 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /></p>
<p>You will get below screen once you execute above command on your terminal screen.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1884" src="http://techyaz.com/wp-content/uploads/2018/02/3-Htop_Running-min.jpg" alt="htop running screen" width="960" height="720" srcset="https://techyaz.com/wp-content/uploads/2018/02/3-Htop_Running-min.jpg 960w, https://techyaz.com/wp-content/uploads/2018/02/3-Htop_Running-min-300x225.jpg 300w, https://techyaz.com/wp-content/uploads/2018/02/3-Htop_Running-min-768x576.jpg 768w" sizes="auto, (max-width: 960px) 100vw, 960px" /></p>
<p>It&#8217;s the initial screen. As we can see, it is very simple and easy to understand. We can have fun in three parts that we will study. In this &#8220;first part&#8221; we see the use of the processor and RAM by all processes along with other details. On the right side a small summary of them: how many tasks are running and the total active time.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1885" src="http://techyaz.com/wp-content/uploads/2018/02/4-Htop_top-min.jpg" alt="Top section of htop window" width="766" height="131" srcset="https://techyaz.com/wp-content/uploads/2018/02/4-Htop_top-min.jpg 766w, https://techyaz.com/wp-content/uploads/2018/02/4-Htop_top-min-300x51.jpg 300w" sizes="auto, (max-width: 766px) 100vw, 766px" /></p>
<p>&#8220;Second part&#8221; also you can say middle part is the main view where all the processes are showing. You can see this in below image.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1886" src="http://techyaz.com/wp-content/uploads/2018/02/5-Htop_middle-min.jpg" alt="Main Processes View" width="932" height="430" srcset="https://techyaz.com/wp-content/uploads/2018/02/5-Htop_middle-min.jpg 932w, https://techyaz.com/wp-content/uploads/2018/02/5-Htop_middle-min-300x138.jpg 300w, https://techyaz.com/wp-content/uploads/2018/02/5-Htop_middle-min-768x354.jpg 768w" sizes="auto, (max-width: 932px) 100vw, 932px" /></p>
<p>This is where we have the information through columns that contain details about these processes. The columns are:</p>
<ul>
<li>PID: Displays the process identifier number.</li>
<li>User: The user tells us that he has activated this process.</li>
<li>PRI: It shows the priority with which the process is executed.</li>
<li>NI: Shows the priority level</li>
<li>VIRT: The number of virtual memory used by the process.</li>
<li>RES: Used ram memory (Megabytes)</li>
<li>SHR: Shared memory used</li>
<li>S: Process status (Running, sleeping or zombie)</li>
<li>CPU%: percentage of CPU used by the process</li>
<li>MEM%: percentage of ram memory used by the process</li>
<li>TIME+: Active life-time of the process</li>
<li>Command: The command that executes the process.</li>
</ul>
<p>So with this we have all the information of the processes that are running at that time.</p>
<p>The &#8220;last part&#8221; displays the tools provided by Htop for navigation. For example, allows us to search, sort the processes and the best, for me, the &#8220;kill&#8221; processes by using shortcut keys.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1887" src="http://techyaz.com/wp-content/uploads/2018/02/6-Htop_bottom-min.jpg" alt="Lower section of Htop" width="828" height="64" srcset="https://techyaz.com/wp-content/uploads/2018/02/6-Htop_bottom-min.jpg 828w, https://techyaz.com/wp-content/uploads/2018/02/6-Htop_bottom-min-300x23.jpg 300w, https://techyaz.com/wp-content/uploads/2018/02/6-Htop_bottom-min-768x59.jpg 768w" sizes="auto, (max-width: 828px) 100vw, 828px" /></p>
<p>To kill a process we must navigate through the processes with the up and down keys, select it, press the <strong>F9</strong> key, and choose the number that corresponds to the option of killing that serves us. I almost always use the 9th showing in below screen.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-1888" src="http://techyaz.com/wp-content/uploads/2018/02/7-Htop_Kill-min-1024x552.png" alt="htop kill screen" width="1024" height="552" srcset="https://techyaz.com/wp-content/uploads/2018/02/7-Htop_Kill-min-1024x552.png 1024w, https://techyaz.com/wp-content/uploads/2018/02/7-Htop_Kill-min-300x162.png 300w, https://techyaz.com/wp-content/uploads/2018/02/7-Htop_Kill-min-768x414.png 768w, https://techyaz.com/wp-content/uploads/2018/02/7-Htop_Kill-min.png 1366w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>In conclusion we can say that Htop is a great tool to visualize the active and non-active processes in our Linux systems. Being terminal-based, it has the advantage of consuming virtually nothing in resources and helps us to close very heavy or unnecessary processes.</p>
<p>Here i have shown you how to install Htop on Red Hat, Ubuntu, Fedora and Debian systems and its uses. I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><span style="color: #800000;"><strong><em>Read More:</em></strong></span></p>
<ul>
<li><strong><a href="http://techyaz.com/debian/how-to-install-debian-9-stretch/" target="_blank" rel="noopener">How to Install Debian 9 Stretch?</a></strong></li>
<li><strong><a href="http://techyaz.com/ubuntu/how-to-install-zabbix-on-ubuntu-server-16-04/" target="_blank" rel="noopener">How to Install Zebbix on Ubuntu 16.4?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-on-linux/step-step-process-install-red-hat-enterprise-linux/" target="_blank" rel="noopener">How to Install RedHat Enterprise Linux?</a></strong></li>
<li><strong><a href="http://techyaz.com/ubuntu/install-ubuntu-linux-server-16-04-virtual-machine-step-by-step/" target="_blank" rel="noopener">Installing Ubuntu 16.04 in Step by Step Process</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/linux/install-htop-monitor-linux-processes/">How to Install Htop and Use it to Monitor Linux Processes?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/linux/install-htop-monitor-linux-processes/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Reset or Change User Password on RedHat Linux</title>
		<link>https://techyaz.com/rhel/how-to-reset-or-change-user-password-on-linux/</link>
					<comments>https://techyaz.com/rhel/how-to-reset-or-change-user-password-on-linux/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Wed, 20 Dec 2017 15:00:30 +0000</pubDate>
				<category><![CDATA[RedHat Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[change password]]></category>
		<category><![CDATA[red hat Linux]]></category>
		<category><![CDATA[RHEL]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1369</guid>

					<description><![CDATA[<p>Password change is a routine task to keep your login secure. We use passwd tool on most of the Linux operating systems to change user password. The passwd tool changes passwords for user and group accounts, even you can change your&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/rhel/how-to-reset-or-change-user-password-on-linux/">How to Reset or Change User Password on RedHat Linux</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Password change is a routine task to keep your login secure. We use <strong>passwd</strong> tool on most of the Linux operating systems to change user password. The <strong>passwd</strong> tool changes passwords for user and group accounts, even you can change your root password using this tool. If you are a normal user, you can change only your password using this tool whereas you can change the password for any account using root access.</p>
<p><em><span style="color: #800000;"><strong>Related Articles</strong></span></em></p>
<ul>
<li><a href="https://techyaz.com/sql-server/sql-server-on-linux/change-hostname-red-hat-linux-server/" target="_blank" rel="noopener">How to Change Hostname of RedHat Linux Server?</a></li>
<li><a href="https://techyaz.com/sql-server/sql-server-on-linux/check-change-ip-address-subnet-mask-default-gateway-linux-server/" target="_blank" rel="noopener">How to Change IP, Subnet Mask and Default Gateway of RHEL Machine?</a></li>
<li><a href="https://techyaz.com/sql-server/sql-server-on-linux/step-step-process-install-red-hat-enterprise-linux/" target="_blank" rel="noopener">Step by Step Process to Install RHEL 7.3</a></li>
</ul>
<h3><span style="color: #333399;"><strong>Change User Password in Linux</strong></span></h3>
<p>We will use passwd command to change our own password. Type <strong>passwd</strong> without specifying a username if you are changing your password. You will be prompted to enter your old password for verification, and then a new password. Below is the high level steps to follow password change process.</p>
<ol>
<li>Open Linux terminal or connect to your server using PuTTY.</li>
<li>Type <strong>passwd</strong> and press Enter.</li>
<li>Type your <strong>current password</strong> and press Enter.</li>
<li>Now type your <strong>new password </strong>and press Enter.</li>
<li>Make sure your password is complex and not similar to older one otherwise you will get BAD PASSWORD error as shown in below screenshot.</li>
<li>Retype your new password and press Enter.</li>
<li>Now you will get notify that your password has been changed.</li>
</ol>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1374" src="http://techyaz.com/wp-content/uploads/2017/12/change-password-min.jpg" alt="Change Linux user password" width="670" height="360" srcset="https://techyaz.com/wp-content/uploads/2017/12/change-password-min.jpg 670w, https://techyaz.com/wp-content/uploads/2017/12/change-password-min-300x161.jpg 300w" sizes="auto, (max-width: 670px) 100vw, 670px" /></p>
<h3><span style="color: #333399;"><strong>Change root Password</strong></span></h3>
<p>The &#8220;root&#8221; account is the most privileged account on a Linux system. When using this account, it is crucial to be very careful. Follow below steps to reset or change the password for your root account.</p>
<ol>
<li>Open Linux terminal or connect to your server using PuTTY.</li>
<li>Type <strong>su</strong> at the command prompt, and press Enter.</li>
<li>Type the <strong>current root password</strong>, then press Enter.</li>
<li>Type <strong>passwd</strong> and press Enter.</li>
<li>Type a <strong>new password</strong> and press Enter.</li>
<li><strong>Retype the new password</strong> and press Enter.</li>
<li>Your password is changed here.</li>
</ol>
<h3><span style="color: #333399;"><strong>Change other User’s Account Password</strong></span></h3>
<p>To change a password for a user, you need to login using &#8220;root&#8221; account. Follow below steps to change password on behalf of any user.</p>
<ol>
<li>Open Linux terminal or connect to your server using PuTTY.</li>
<li>Type <strong>su</strong> at the command prompt, and press Enter.</li>
<li>Enter <strong>current root password</strong>, then press Enter.</li>
<li>Type <strong>passwd LoginName</strong> and press Enter. If login account is Manvendra. Type passwd Manvendra.</li>
<li>Enter a <strong>new password</strong> and press Enter.</li>
<li><strong>Retype the new password</strong> and press Enter.</li>
<li>Your password is changed here.</li>
</ol>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and  <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/rhel/how-to-reset-or-change-user-password-on-linux/">How to Reset or Change User Password on RedHat Linux</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/rhel/how-to-reset-or-change-user-password-on-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Change Hostname of RedHat Linux Server</title>
		<link>https://techyaz.com/rhel/change-hostname-red-hat-linux-server/</link>
					<comments>https://techyaz.com/rhel/change-hostname-red-hat-linux-server/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Wed, 13 Dec 2017 07:29:58 +0000</pubDate>
				<category><![CDATA[RedHat Linux]]></category>
		<category><![CDATA[SQL Server ON Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[red hat Linux]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[SQL Server On Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1329</guid>

					<description><![CDATA[<p>Last week we had received some requests to rename or change hostname of RedHat Linux systems. We got these requests because the hostname of these linux servers were not as per the server naming convention standard. Here, I will explain&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/rhel/change-hostname-red-hat-linux-server/">How to Change Hostname of RedHat Linux Server</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Last week we had received some requests to rename or change hostname of RedHat Linux systems. We got these requests because the hostname of these linux servers were not as per the server naming convention standard. Here, I will explain how to rename hostname of any redhat linux server. I changed hostname of RHEL servers that are hosted in my lab to show you step by step method.</p>
<p><em><span style="color: #800000;"><strong>Related Articles:</strong></span></em></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/check-change-ip-address-subnet-mask-default-gateway-linux-server/" target="_blank" rel="noopener">How to Change IP Address, Subnet Mask &amp; Default Gateway of Linux Server</a></strong></li>
<li><strong><a href="https://techyaz.com/rhel/fixing-error-user-not-sudoers-file-incident-will-reported-red-hat-linux-server/" target="_blank" rel="noopener">Fix Error &#8220;User is not in sudoers file.</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-on-redhat-linux/" target="_blank" rel="noopener">Installing SQL Server 2017 on Red Hat Linux Server</a></strong></li>
</ul>
<p>There are three methods that i will explain here to rename or change hostname of any Redhat Linux server. These three methods that we will use in this article are given below.</p>
<ol>
<li>Edit etc/hostname.</li>
<li>nmcli utility.</li>
<li>hostnamectl utility.</li>
</ol>
<h3><span style="color: #333399;">Change Hostname of RedHat Linux Server by editing etc/hostname</span></h3>
<p>Connect to your Redhat Linux server and check the hostname by running below command.</p>
<pre><strong><span style="color: #008000;">#Check hostname using any command.</span>
<span style="color: #0000ff;">hostname</span>

<span style="color: #008000;">#You can run below command as well to check the hostname.</span>
<span style="color: #0000ff;">cat /etc/hostname
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1331" src="http://techyaz.com/wp-content/uploads/2017/12/1-check-existing-host-name-min.jpg" alt="Check linux hostname" width="605" height="200" srcset="https://techyaz.com/wp-content/uploads/2017/12/1-check-existing-host-name-min.jpg 605w, https://techyaz.com/wp-content/uploads/2017/12/1-check-existing-host-name-min-300x99.jpg 300w" sizes="auto, (max-width: 605px) 100vw, 605px" /></p>
<p>We can see the hostname of this RedHat Linux server is SQLServerRHEL.localdomain. Now we will change this name to TechyazRHEL. If you want to change hostname with fully qualified name then you can write fully qualified name in below command.</p>
<pre><strong><span style="color: #008000;">#Connect to RHEL as root.</span>
<span style="color: #0000ff;">Sudo su</span>
<span style="color: #008000;">
#Change Hostname using /etc/hostname. Make sure to write your new hostname in double quote.</span>
<span style="color: #0000ff;">echo "TechyazRHEL" &gt; /etc/hostname
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1332" src="http://techyaz.com/wp-content/uploads/2017/12/3-change-host-name-min.jpg" alt="change hostname by editing etc/hostname" width="664" height="205" srcset="https://techyaz.com/wp-content/uploads/2017/12/3-change-host-name-min.jpg 664w, https://techyaz.com/wp-content/uploads/2017/12/3-change-host-name-min-300x93.jpg 300w" sizes="auto, (max-width: 664px) 100vw, 664px" /></p>
<p>You can see when we check hostname of this linux server using <em><strong>hostname</strong></em> command, it is still showing older name SQLServerRHEL.localdomain whereas when we check using <strong><em>cat /etc/hostname</em></strong> it is showing newly changed hostname.</p>
<p>To reflect new host name, we need to restart service <strong>systemd-hostnamed</strong>. Once you will restart this service, the output of <em><strong>hostname</strong></em> command will also be same as new hostname as shown in above image.</p>
<pre><strong><span style="color: #008000;">#Restart service systemd-hostnamed</span>
<span style="color: #0000ff;">service systemd-hostnamed restart
</span> <span style="color: #008000;">or</span>
<span style="color: #0000ff;">systemctl restart systemd-hostnamed</span> 
</strong></pre>
<p>You can see new hostname after restarting above service in above screenshot. One thing you might notice that command prompt is still showing as older hostname i.e. root@SQLServerRHEL. This will disappear if you close this session and connect to new session. Let&#8217;s try this by launching new session, you can see new session is showing new hostname in below image.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1333" src="http://techyaz.com/wp-content/uploads/2017/12/4-New-Session-min.jpg" alt="new session post renaming hostname" width="639" height="134" srcset="https://techyaz.com/wp-content/uploads/2017/12/4-New-Session-min.jpg 639w, https://techyaz.com/wp-content/uploads/2017/12/4-New-Session-min-300x63.jpg 300w" sizes="auto, (max-width: 639px) 100vw, 639px" /></p>
<h3><span style="color: #333399;">Rename Hostname of RedHat Linux Server using nmcli</span></h3>
<p>The nmcli (NetworkManager Command Line Interface) command-line utility is used for controlling Network Manager and reporting network status. nmcli is used to create, display, edit, delete, activate, and deactivate network connections, as well as control and display network device status. Here, we will use nmcli utility to change the hostname of redhat linux server.</p>
<p>Connect to your RedHat Linux server for which you want to change hostname. Run below commands to change hostname of your linux server.</p>
<pre><strong><span style="color: #008000;">#Connect to RedHat Linux server using root access.</span>
<span style="color: #0000ff;">sudo su</span>

<span style="color: #008000;">#Check existing hostname of RHEL server</span>
<span style="color: #0000ff;">hostname</span>

<span style="color: #008000;">#Change hostname of Redhat Linux server to techyazRHEL-nmCLI. </span></strong>
<strong><span style="color: #008000;">#Change your new hostname in place of techyazRHEL-nmCLI.</span>
<span style="color: #0000ff;">nmcli general hostname techyazRHEL-nmCLI</span>

<span style="color: #008000;">#You can also check the hostname of Redhat linux server using nmcli utility.</span>
<span style="color: #0000ff;">nmcli general hostname
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1334" src="http://techyaz.com/wp-content/uploads/2017/12/5-nmcli-min.jpg" alt="CHange hostname using nmcli utility" width="732" height="137" srcset="https://techyaz.com/wp-content/uploads/2017/12/5-nmcli-min.jpg 732w, https://techyaz.com/wp-content/uploads/2017/12/5-nmcli-min-300x56.jpg 300w" sizes="auto, (max-width: 732px) 100vw, 732px" /></p>
<p>You can see hostname of RHEL server has been changed to techyazRHEL-nmCLI in above screenshot. Your PuTTY terminal will display new hostname once you open new session.</p>
<p>If new hostname is not showing after running above command then you should restart service <strong>systemd-hostnamed</strong> to reflect changes as we did in first section. You can see new hostname while launching new session in below screenshot.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1335" src="http://techyaz.com/wp-content/uploads/2017/12/6-nmcli-min.jpg" alt="new session post renaming hostname using nmcli" width="599" height="129" srcset="https://techyaz.com/wp-content/uploads/2017/12/6-nmcli-min.jpg 599w, https://techyaz.com/wp-content/uploads/2017/12/6-nmcli-min-300x65.jpg 300w" sizes="auto, (max-width: 599px) 100vw, 599px" /></p>
<h3><span style="color: #333399;">Rename Hostname of RedHat Linux Server using hostnamectl</span></h3>
<p>The hostnamectl tool is provided for administering the host names in use on a given system. First we will check the existing hostname of this server by running <em><strong>hostname</strong></em> command. We can also check the hostname using hostnamectl utility.</p>
<p>Connect to your Redhat Linux server using root and check the existing hostname.</p>
<pre><strong><span style="color: #008000;">#Connect to Linux server using root.</span>
<span style="color: #0000ff;">sudo su</span>

<span style="color: #008000;">#Check existing hostname.</span>
<span style="color: #0000ff;">hostname</span>
<span style="color: #008000;">or</span> 
<span style="color: #0000ff;">hostnamectl status</span>

<span style="color: #008000;">#Change hostname to techyazRHEL.</span>
<span style="color: #0000ff;">hostnamectl set-name techyazRHEL
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1336" src="http://techyaz.com/wp-content/uploads/2017/12/7-hostnamectl-min.jpg" alt="change hostname using hostnamectl" width="744" height="281" srcset="https://techyaz.com/wp-content/uploads/2017/12/7-hostnamectl-min.jpg 744w, https://techyaz.com/wp-content/uploads/2017/12/7-hostnamectl-min-300x113.jpg 300w, https://techyaz.com/wp-content/uploads/2017/12/7-hostnamectl-min-1320x500.jpg 1320w" sizes="auto, (max-width: 744px) 100vw, 744px" /></p>
<p>You can check the hostname post renaming it. You can see new hostname in above image. Putty terminal will display new hostname once you open new session as shown in below image.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1337" src="http://techyaz.com/wp-content/uploads/2017/12/8-hostnamectl-min.jpg" alt="New session to reflect new hostname" width="604" height="132" srcset="https://techyaz.com/wp-content/uploads/2017/12/8-hostnamectl-min.jpg 604w, https://techyaz.com/wp-content/uploads/2017/12/8-hostnamectl-min-300x66.jpg 300w" sizes="auto, (max-width: 604px) 100vw, 604px" /></p>
<p>We can set all three kind of hostnames (Static, Pretty and Transient) using hostnamectl utility. Static name is mandatory whereas remaining two is optional. If you will not pass any hostname type in above command, same name will be set for all three hostnames. I haven&#8217;t used any hostname option in above command so all hostname options will have same name. Let&#8217;s check this in below image.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1338" src="http://techyaz.com/wp-content/uploads/2017/12/9-hostnamectl-min.jpg" alt="check hostname using hostnamectl utility" width="695" height="279" srcset="https://techyaz.com/wp-content/uploads/2017/12/9-hostnamectl-min.jpg 695w, https://techyaz.com/wp-content/uploads/2017/12/9-hostnamectl-min-300x120.jpg 300w" sizes="auto, (max-width: 695px) 100vw, 695px" /></p>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/rhel/change-hostname-red-hat-linux-server/">How to Change Hostname of RedHat Linux Server</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/rhel/change-hostname-red-hat-linux-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Uninstall SQL Server 2017 from RedHat Linux Server</title>
		<link>https://techyaz.com/sql-server/sql-server-on-linux/uninstall-sql-server-2017-red-hat-linux-server/</link>
					<comments>https://techyaz.com/sql-server/sql-server-on-linux/uninstall-sql-server-2017-red-hat-linux-server/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Fri, 08 Dec 2017 07:28:04 +0000</pubDate>
				<category><![CDATA[RedHat Linux]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server ON Linux]]></category>
		<category><![CDATA[red hat Linux]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[SQL Server 2017]]></category>
		<category><![CDATA[SQL Server On Linux]]></category>
		<category><![CDATA[SQL Server Uninstallation]]></category>
		<category><![CDATA[uninstallation]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1307</guid>

					<description><![CDATA[<p>We all know how to install SQL Server 2017 on RedHat Linux. Here I will explain step by step process to uninstall SQL Server 2017 on RedHat Linux 7.3 server. Read More on SQL Server Installation on Linux Servers Installing&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/sql-server-on-linux/uninstall-sql-server-2017-red-hat-linux-server/">How to Uninstall SQL Server 2017 from RedHat Linux Server</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We all know <a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-on-redhat-linux/" target="_blank" rel="noopener">how to install SQL Server 2017 on RedHat Linux</a>. Here I will explain step by step process to uninstall SQL Server 2017 on RedHat Linux 7.3 server.</p>
<p><em><strong><span style="color: #800000;">Read More on SQL Server Installation on Linux Servers</span></strong></em></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-2017-ubuntu-internet-access/" target="_blank" rel="noopener">Installing SQL Server 2017 on Ubuntu Server</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-2017-redhat-linux-without-internet-offline-installation/" target="_blank" rel="noopener">How to Install SQL Server on Redhat Linux without Internet &#8211; Offline Installation</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-2017-on-ubuntu-server-without-internet-offline-installation/" target="_blank" rel="noopener">How to Install SQL Server on Ubuntu without Internet access &#8211; Offline Installation</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/installing-sql-tools-red-hat-linux/" target="_blank" rel="noopener">Installing SQL Tools on RedHat Linux Server</a></strong></li>
</ul>
<h3><span style="color: #333399;">Uninstall SQL Server 2017 on RHEL</span></h3>
<p>Uninstalling SQL Server 2017 that is running on Linux server is totally different process as compared to its windows based SQL Server. Follow below step by step process to uninstall SQL Server 2017 from your RHEL Linux server.</p>
<p><strong>1-</strong> Connect to your RHEL server where SQL Server 2017 is running and that needs to be uninstalled from the server. Check whether SQL Server is installed on this machine or not by checking SQL Server service. You can see SQL Server is running on this server.</p>
<pre><strong><span style="color: #008000;">#Run below command to check SQL Server Service.</span>
<span style="color: #0000ff;">systemctl status mssql-server
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1309" src="http://techyaz.com/wp-content/uploads/2017/12/1-Check-SQL-Server-min.jpg" alt="Check SQL Server Service on RHEL" width="999" height="190" srcset="https://techyaz.com/wp-content/uploads/2017/12/1-Check-SQL-Server-min.jpg 999w, https://techyaz.com/wp-content/uploads/2017/12/1-Check-SQL-Server-min-300x57.jpg 300w, https://techyaz.com/wp-content/uploads/2017/12/1-Check-SQL-Server-min-768x146.jpg 768w" sizes="auto, (max-width: 999px) 100vw, 999px" /></p>
<p><strong>2-</strong> Check SQL Server files along with the database files before removing SQL Server. We will validate SQL Server removal by checking these files post uninstallation.</p>
<pre><strong><span style="color: #008000;">#Check SQL Server binaries &amp; database files</span>
<span style="color: #0000ff;">sudo ls -lrt /var/opt/mssql
sudo ls -lrt /var/opt/mssql/data
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1310" src="http://techyaz.com/wp-content/uploads/2017/12/2-check-files-min.jpg" alt="check database files" width="622" height="373" srcset="https://techyaz.com/wp-content/uploads/2017/12/2-check-files-min.jpg 622w, https://techyaz.com/wp-content/uploads/2017/12/2-check-files-min-300x180.jpg 300w" sizes="auto, (max-width: 622px) 100vw, 622px" /></p>
<p><span style="color: #ff0000;"><em><strong>Note:</strong> </em></span><strong><em>Make sure to run full backup of all your databases and keep them in a safer place for future needs. </em></strong></p>
<p><strong>3-</strong> Now, we will uninstall SQL Server by running below command.</p>
<pre><strong><span style="color: #008000;">#Remove SQL Server from your Linux machine</span>
<span style="color: #0000ff;">sudo yum remove mssql-server
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1311 size-full" src="http://techyaz.com/wp-content/uploads/2017/12/3-Remove-SQl-Server-min.jpg" alt="uninstall SQL Server 2017 from RHEL" width="1424" height="676" srcset="https://techyaz.com/wp-content/uploads/2017/12/3-Remove-SQl-Server-min.jpg 1424w, https://techyaz.com/wp-content/uploads/2017/12/3-Remove-SQl-Server-min-300x142.jpg 300w, https://techyaz.com/wp-content/uploads/2017/12/3-Remove-SQl-Server-min-768x365.jpg 768w, https://techyaz.com/wp-content/uploads/2017/12/3-Remove-SQl-Server-min-1024x486.jpg 1024w" sizes="auto, (max-width: 1424px) 100vw, 1424px" /></p>
<p>You can see details of SQL Server packages that are going to be removed from this machine. These packages are SQL Server and SQL Server Agent that are going to be removed here. Above command will ask us to type <strong>y</strong> to proceed with the uninstallation and type <strong>N</strong> to quit this uninstallation. Type <strong>y</strong> to proceed with the SQL Server removal.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1312 size-full" src="http://techyaz.com/wp-content/uploads/2017/12/4-remove-sql-server-min.jpg" alt="uninstall sql server 2017 from rhel" width="706" height="411" srcset="https://techyaz.com/wp-content/uploads/2017/12/4-remove-sql-server-min.jpg 706w, https://techyaz.com/wp-content/uploads/2017/12/4-remove-sql-server-min-300x175.jpg 300w" sizes="auto, (max-width: 706px) 100vw, 706px" /></p>
<p>You can see SQL Server and SQL Server Agent both packages have been removed from this machine.</p>
<p><strong>4-</strong> Now, remove all SQL Server binaries and database files from its installed location that we checked in second screenshot by running below command.</p>
<pre><strong><span style="color: #008000;">#Remove database files and SQL binaries.</span>
<span style="color: #0000ff;">sudo rm -rf /var/opt/mssql
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1313" src="http://techyaz.com/wp-content/uploads/2017/12/5-remove-files-min.jpg" alt="remove sql server binaries" width="795" height="47" srcset="https://techyaz.com/wp-content/uploads/2017/12/5-remove-files-min.jpg 795w, https://techyaz.com/wp-content/uploads/2017/12/5-remove-files-min-300x18.jpg 300w, https://techyaz.com/wp-content/uploads/2017/12/5-remove-files-min-768x45.jpg 768w" sizes="auto, (max-width: 795px) 100vw, 795px" /></p>
<p>Here, your SQL Server has been removed from this linux machine. You can check SQL Server binaries and database files by running below commands. We can see no files in these locations because they have been removed now.</p>
<pre><strong><span style="color: #008000;">#Check database files.</span>
<span style="color: #0000ff;">sudo ls -lrt /var/opt/mssql/data</span>

<span style="color: #008000;">#Check SQL Server files &amp; folders.</span>
<span style="color: #0000ff;">sudo ls -lrt /var/opt/mssql
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1314" src="http://techyaz.com/wp-content/uploads/2017/12/6-check-files-post-removal-min.jpg" alt="check sql server binaries" width="724" height="136" srcset="https://techyaz.com/wp-content/uploads/2017/12/6-check-files-post-removal-min.jpg 724w, https://techyaz.com/wp-content/uploads/2017/12/6-check-files-post-removal-min-300x56.jpg 300w" sizes="auto, (max-width: 724px) 100vw, 724px" /></p>
<p><strong>5-</strong> Now you can check SQL Server service again by executing below command.</p>
<pre><strong><span style="color: #008000;">#Check SQL Server Service post SQL Server Removal.</span>
<span style="color: #0000ff;">systemctl status mssql-server</span> </strong></pre>
<p>We can see SQL Server is not loaded this time but service is showing as active.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1315" src="http://techyaz.com/wp-content/uploads/2017/12/7-Check-SQL-Server-post-removal-min.jpg" alt="Check SQL Server service post uninstallation" width="866" height="183" srcset="https://techyaz.com/wp-content/uploads/2017/12/7-Check-SQL-Server-post-removal-min.jpg 866w, https://techyaz.com/wp-content/uploads/2017/12/7-Check-SQL-Server-post-removal-min-300x63.jpg 300w, https://techyaz.com/wp-content/uploads/2017/12/7-Check-SQL-Server-post-removal-min-768x162.jpg 768w" sizes="auto, (max-width: 866px) 100vw, 866px" /></p>
<p>When you will try to restart this service, it will throw you an error that unit not found as shown in below image.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1316" src="http://techyaz.com/wp-content/uploads/2017/12/8-Restart-sql-server-min.jpg" alt="Restart SQL Server service post uinstallation" width="719" height="153" srcset="https://techyaz.com/wp-content/uploads/2017/12/8-Restart-sql-server-min.jpg 719w, https://techyaz.com/wp-content/uploads/2017/12/8-Restart-sql-server-min-300x64.jpg 300w" sizes="auto, (max-width: 719px) 100vw, 719px" /></p>
<p><strong>6-</strong> Now we need to reboot the server to update SQL Server service status on RHEL. I restarted this linux machine and again checked the SQL Server service. You can see this time it says service could not found.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1317" src="http://techyaz.com/wp-content/uploads/2017/12/9-reboot-server-check-service-min.jpg" alt="restart RHEL and check SQL Service" width="584" height="264" srcset="https://techyaz.com/wp-content/uploads/2017/12/9-reboot-server-check-service-min.jpg 584w, https://techyaz.com/wp-content/uploads/2017/12/9-reboot-server-check-service-min-300x136.jpg 300w" sizes="auto, (max-width: 584px) 100vw, 584px" /></p>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/sql-server-on-linux/uninstall-sql-server-2017-red-hat-linux-server/">How to Uninstall SQL Server 2017 from RedHat Linux Server</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/sql-server-on-linux/uninstall-sql-server-2017-red-hat-linux-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Fixing Error &#8220;User is not in the sudoers file. This incident will be reported.&#8221;</title>
		<link>https://techyaz.com/rhel/fixing-error-user-not-sudoers-file-incident-will-reported-red-hat-linux-server/</link>
					<comments>https://techyaz.com/rhel/fixing-error-user-not-sudoers-file-incident-will-reported-red-hat-linux-server/#comments</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Thu, 31 Aug 2017 09:11:51 +0000</pubDate>
				<category><![CDATA[RedHat Linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[logins]]></category>
		<category><![CDATA[red hat Linux]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[sudoers file]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wheel group]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=712</guid>

					<description><![CDATA[<p>I got this error during one of the activity when i was not able to perform it because my user was not part of sudoers file.  The error details were given as &#8220;User is not in the sudoers file. This&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/rhel/fixing-error-user-not-sudoers-file-incident-will-reported-red-hat-linux-server/">Fixing Error &#8220;User is not in the sudoers file. This incident will be reported.&#8221;</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I got this error during one of the activity when i was not able to perform it because my user was not part of sudoers file.  The error details were given as &#8220;<em>User is not in the sudoers file. This incident will be reported.</em>&#8221; If a user is not part of sudoers file then that user cannot perform anything using sudo command. Here i will explain how to fix this error or in other words you can say how to add a Linux user into sudoers file.</p>
<h3><span style="color: #000080;"><strong>Linux Error: User is not in the sudoers file. This incident will be reported.</strong></span></h3>
<p>Sudoers file determines which users can run administrative tasks, those requiring superuser privileges. I was failed to perform certain tasks because my username was not part of this file and returned with below error.</p>
<p><span class="kwrd" style="color: red;"><em>Linux Error: User is not in the sudoers file. This incident will be reported.</em><br />
</span></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-713" src="http://techyaz.com/wp-content/uploads/2017/08/1-1.jpg" alt="user name not in sudoers file" width="739" height="67" srcset="https://techyaz.com/wp-content/uploads/2017/08/1-1.jpg 739w, https://techyaz.com/wp-content/uploads/2017/08/1-1-300x27.jpg 300w" sizes="auto, (max-width: 739px) 100vw, 739px" /></p>
<p>Someone who has super user (su) access can fix this issue by adding the impacted user to the <strong>Wheel group</strong>. The <strong>wheel group</strong> is a special user group used on Linux systems to control access to the sudo command, which allows a user to behave as super user. Once we will add our user into this group, we will be able to use sudo command.</p>
<h3><span style="color: #000080;"><strong>Adding a Linux User to Sudoers File</strong></span></h3>
<p>Connect to your Linux server using superuser account.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: blue;"><span style="color: #008000;">#Connect using su</span>
su
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-714" src="http://techyaz.com/wp-content/uploads/2017/08/2-login-using-su.jpg" alt="login using su account" width="461" height="64" srcset="https://techyaz.com/wp-content/uploads/2017/08/2-login-using-su.jpg 461w, https://techyaz.com/wp-content/uploads/2017/08/2-login-using-su-300x42.jpg 300w" sizes="auto, (max-width: 461px) 100vw, 461px" /></p>
<p>We have now connected to Linux server using superuser account. Now we can add our username to the Wheel group.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: blue;"><span style="color: #008000;">#Add your user to the Wheel group. 
#Change techyaz to your user name</span>.
usermod -G wheel techyaz
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-715" src="http://techyaz.com/wp-content/uploads/2017/08/3-add-wheel-group.jpg" alt="Add Username to wheel group" width="670" height="90" srcset="https://techyaz.com/wp-content/uploads/2017/08/3-add-wheel-group.jpg 670w, https://techyaz.com/wp-content/uploads/2017/08/3-add-wheel-group-300x40.jpg 300w" sizes="auto, (max-width: 670px) 100vw, 670px" /></p>
<p>Now we see that command executed successfully. If you attempt to execute the sudo command now, you might get the same error message unless you completely logout your user and re-login again. Next you can exit from superuser account by typing exit on the prompt.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: blue;"><span style="color: #008000;">#Exit su account</span>
exit
</span></strong></pre>
<p>Your account or user added to sudoers file now by adding it to wheel group. You can now connect to Linux server from your PuTTY terminal or on the local server and try to run sudo command post completely logout your user and re-login on the server.</p>
<pre class="brush: sql; title: ; notranslate" title=""><span class="kwrd" style="color: blue;"><strong><span style="color: #008000;">#Connect to Linux server using your user name that was added to wheel group.
#Run sudo su</span></strong>
<strong>sudo su
</strong></span></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-716" src="http://techyaz.com/wp-content/uploads/2017/08/4-validate.jpg" alt="validate the change" width="840" height="198" srcset="https://techyaz.com/wp-content/uploads/2017/08/4-validate.jpg 840w, https://techyaz.com/wp-content/uploads/2017/08/4-validate-300x71.jpg 300w, https://techyaz.com/wp-content/uploads/2017/08/4-validate-768x181.jpg 768w" sizes="auto, (max-width: 840px) 100vw, 840px" /></p>
<p>You can see we have access to run anything using sudo command in above screenshot. Now your username is part of sudoers file so you can perform your activities using sudo command now.</p>
<p><em><span style="color: #800000;"><strong>Read more:</strong></span></em></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/step-step-process-install-red-hat-enterprise-linux/" target="_blank" rel="noopener">How to Install Red Hat Linux 7.3 on Virtual Machine</a></strong></li>
<li><strong><a href="https://techyaz.com/rhel/fix-putty-network-error-connection-timed/" target="_blank" rel="noopener">Fixing PuTTY connection issue while connecting to Red Hat Linux Server</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-2017-redhat-linux-without-internet-offline-installation/" target="_blank" rel="noopener">Installing SQL Server 2017 on Red Hat Linux Server</a></strong></li>
</ul>
<p>Here, we have fixed Linux error &#8220;<em>User is not in the sudoers file. This incident will be reported</em>.&#8221; I hope you like this article. Please follow us on our <a href="https://www.facebook.com/Techyaz/">facebook</a> page and on <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/rhel/fixing-error-user-not-sudoers-file-incident-will-reported-red-hat-linux-server/">Fixing Error &#8220;User is not in the sudoers file. This incident will be reported.&#8221;</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/rhel/fixing-error-user-not-sudoers-file-incident-will-reported-red-hat-linux-server/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
