<?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>linux create user &#8211; lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</title>
	<atom:link href="https://lifelinux.com/tag/linux-create-user/feed/" rel="self" type="application/rss+xml" />
	<link>https://lifelinux.com</link>
	<description>All About Linux !</description>
	<lastBuildDate>Fri, 20 May 2011 06:21:50 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.15</generator>
	<item>
		<title>How To Add User To Group In Linux</title>
		<link>https://lifelinux.com/how-to-add-user-to-group-in-linux/</link>
					<comments>https://lifelinux.com/how-to-add-user-to-group-in-linux/#comments</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Thu, 19 May 2011 11:16:10 +0000</pubDate>
				<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[add user to group]]></category>
		<category><![CDATA[add user to group linux]]></category>
		<category><![CDATA[create user linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux add group]]></category>
		<category><![CDATA[linux add user]]></category>
		<category><![CDATA[linux add user to a group]]></category>
		<category><![CDATA[linux add user to group]]></category>
		<category><![CDATA[linux create user]]></category>
		<category><![CDATA[primary group]]></category>
		<category><![CDATA[secondary group]]></category>
		<category><![CDATA[setup password]]></category>
		<category><![CDATA[ubuntu add user to group]]></category>
		<category><![CDATA[unix add user to group]]></category>
		<category><![CDATA[user group]]></category>
		<category><![CDATA[user information]]></category>
		<category><![CDATA[useradd command]]></category>
		<category><![CDATA[usermod command]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=649</guid>

					<description><![CDATA[<p>There are two types of group. First is primary user group and other is secondary group. Group infomation is stored in /etc/group file contains basic group attributes. This is an ASCII file that contains records for system groups. useradd command You need to add new users to existing group. The syntax is as follows: # [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-add-user-to-group-in-linux/">How To Add User To Group In Linux</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>There are two types of group. First is primary user group and other is secondary group. Group infomation is stored in <strong>/etc/group</strong> file contains basic group attributes. This is an ASCII file that contains records for system groups.<span id="more-649"></span></p>
<h3>useradd command</h3>
<p>You need to add new users to existing group. The syntax is as follows:</p>
<pre># useradd -g &lt;groupname&gt; &lt;username&gt;</pre>
<p>Example, create a new user called <strong>user1</strong> and add it to group called <strong>admin</strong>. First login as a root user (make sure group admin exists), type the following command</p>
<pre># useradd -g admin user1</pre>
<p>Ensure that user added properly to group admin, enter</p>
<pre># id user1</pre>
<p>Output</p>
<pre>uid=503(user1) gid=502(admin) groups=502(admin)</pre>
<h3>usermod command</h3>
<p>If you need to add a existing user to existing group, type the command with syntax is as follows</p>
<pre># usermod -G &lt;groupname&gt; &lt;username&gt;</pre>
<p>To add user to a list of supplementary groups, enter</p>
<pre># usermod -G group1, group2, group3 username</pre>
<p>How to remove existing Linux user from existing group? See example bellow</p>
<pre>#id test</pre>
<p>Output</p>
<pre>uid=503(test) gid=501(www) groups=501(www),4(adm),50(ftp)</pre>
<p>To remove adm group from user test, type the following command</p>
<pre># usermod -G www,ftp test</pre>
<p>Ensure that adm group removed from user test, enter</p>
<pre># id test</pre>
<p>Output</p>
<pre>uid=503(test) gid=501(www) groups=501(www),50(ftp)</pre>
<p>Change existing user test primary group to ftp, enter</p>
<pre>usermod -g ftp test</pre>
<p>Output</p>
<pre>uid=503(test) gid=50(ftp) groups=50(ftp),501(www)</pre>
<p>Please note that <strong>&#8220;-g&#8221;</strong> option add user to initial login group (primary group). The group name must exist. And <strong>&#8220;-G&#8221;</strong> option add user to a list of supplementary groups</p>
<g:plusone href="https://lifelinux.com/how-to-add-user-to-group-in-linux/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-add-user-to-group-in-linux/">How To Add User To Group In Linux</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-add-user-to-group-in-linux/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
