<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
	>
<channel>
	<title>Comments on: User management from the command line</title>
	<atom:link href="http://www.g-loaded.eu/2005/11/06/manage-users-from-the-command-line/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.g-loaded.eu/2005/11/06/manage-users-from-the-command-line/</link>
	<description>An open-source software and technology related journal</description>
	<lastBuildDate>Fri, 03 Feb 2012 18:35:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: George Notaras</title>
		<link>http://www.g-loaded.eu/2005/11/06/manage-users-from-the-command-line/#comment-19019</link>
		<dc:creator>George Notaras</dc:creator>
		<pubDate>Tue, 18 Oct 2011 12:35:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=71#comment-19019</guid>
		<description>Unfortunately it&#039;s not possible to lock all the members of a group. As a workaround, I&#039;d suggest looping through the group members and calling the &lt;code&gt;usermod -L ...&lt;/code&gt; for each user.</description>
		<content:encoded><![CDATA[<p>Unfortunately it&#8217;s not possible to lock all the members of a group. As a workaround, I&#8217;d suggest looping through the group members and calling the <code>usermod -L ...</code> for each user.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chenna</title>
		<link>http://www.g-loaded.eu/2005/11/06/manage-users-from-the-command-line/#comment-18995</link>
		<dc:creator>chenna</dc:creator>
		<pubDate>Wed, 12 Oct 2011 19:05:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=71#comment-18995</guid>
		<description>how to lock entire group users using a single line command</description>
		<content:encoded><![CDATA[<p>how to lock entire group users using a single line command</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GNot</title>
		<link>http://www.g-loaded.eu/2005/11/06/manage-users-from-the-command-line/#comment-6465</link>
		<dc:creator>GNot</dc:creator>
		<pubDate>Tue, 20 Feb 2007 06:00:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=71#comment-6465</guid>
		<description>Hi, actually you should decide which users you would like to list. System accounts or normal users? Users with a home directory or with the ability to use a shell or just print all of them? There is no such command. The users are kept in the /etc/passwd file. I found a useful &lt;a href=&quot;http://www.linuxquestions.org/questions/showthread.php?t=367164&quot; rel=&quot;nofollow&quot;&gt;discussion&lt;/a&gt; on this that might interest you.
Also, in order to list all the currently logged-in users you issue any of the following commands:
&lt;pre&gt;users&lt;/pre&gt;
or (this displays more info):
&lt;pre&gt;w&lt;/pre&gt;
I hope these help.
</description>
		<content:encoded><![CDATA[<p>Hi, actually you should decide which users you would like to list. System accounts or normal users? Users with a home directory or with the ability to use a shell or just print all of them? There is no such command. The users are kept in the /etc/passwd file. I found a useful <a href="http://www.linuxquestions.org/questions/showthread.php?t=367164" rel="nofollow">discussion</a> on this that might interest you.</p>
<p>Also, in order to list all the currently logged-in users you issue any of the following commands:</p>
<pre>users</pre>
<p>or (this displays more info):</p>
<pre>w</pre>
<p>I hope these help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vijay</title>
		<link>http://www.g-loaded.eu/2005/11/06/manage-users-from-the-command-line/#comment-6451</link>
		<dc:creator>vijay</dc:creator>
		<pubDate>Tue, 20 Feb 2007 04:09:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=71#comment-6451</guid>
		<description>Hi,
what is the command to list all the users in system.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
what is the command to list all the users in system.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zarquan</title>
		<link>http://www.g-loaded.eu/2005/11/06/manage-users-from-the-command-line/#comment-5434</link>
		<dc:creator>Zarquan</dc:creator>
		<pubDate>Tue, 02 Jan 2007 19:38:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=71#comment-5434</guid>
		<description>If your user accounts are in a LDAP server, you can&#039;t use usermod to add them to a local group.
[root@localhost ~]# usermod -a -G localgroup Frog
usermod: Frog not found in /etc/passwd
Hand editing the /etc/group file and adding the username seems to work.</description>
		<content:encoded><![CDATA[<p>If your user accounts are in a LDAP server, you can&#8217;t use usermod to add them to a local group.</p>
<p>[root@localhost ~]# usermod -a -G localgroup Frog<br />
usermod: Frog not found in /etc/passwd</p>
<p>Hand editing the /etc/group file and adding the username seems to work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GNot</title>
		<link>http://www.g-loaded.eu/2005/11/06/manage-users-from-the-command-line/#comment-5122</link>
		<dc:creator>GNot</dc:creator>
		<pubDate>Mon, 27 Nov 2006 09:10:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=71#comment-5122</guid>
		<description>Exactly. First we create the group and then we add the user to it.
But, take a note that on a Red Hat/Fedora system, there is the &lt;strong&gt;-a&lt;/strong&gt; switch which is actually required to be used in such an occasion. If &lt;strong&gt;-a&lt;/strong&gt; is not included in usermod (like it happens in your usermod command), then the user will be removed from all groups and it will be added to the &lt;code&gt;group1&lt;/code&gt; group only. This is how it works on these systems. So, it should be:
&lt;pre&gt;
# groupadd group1
# usermod -a -G group1 username
&lt;/pre&gt;
From the usermod man page on fedora 6 about the &lt;strong&gt;-G&lt;/strong&gt; switch:
&lt;blockquote&gt;
If the user is currently a member of a group which is not listed, the user will be removed from the group. This behaviour can be changed via -a option, which appends user to the current supplementary group list.
&lt;/blockquote&gt;
Please refer to your distribution&#039;s usermod man page, so to know exactly if a &lt;strong&gt;-a&lt;/strong&gt; switch is supported or if there is another switch that should be used when adding a user to a group.
</description>
		<content:encoded><![CDATA[<p>Exactly. First we create the group and then we add the user to it.</p>
<p>But, take a note that on a Red Hat/Fedora system, there is the <strong>-a</strong> switch which is actually required to be used in such an occasion. If <strong>-a</strong> is not included in usermod (like it happens in your usermod command), then the user will be removed from all groups and it will be added to the <code>group1</code> group only. This is how it works on these systems. So, it should be:</p>
<pre>
# groupadd group1
# usermod -a -G group1 username
</pre>
<p>From the usermod man page on fedora 6 about the <strong>-G</strong> switch:</p>
<blockquote><p>
If the user is currently a member of a group which is not listed, the user will be removed from the group. This behaviour can be changed via -a option, which appends user to the current supplementary group list.
</p></blockquote>
<p>Please refer to your distribution&#8217;s usermod man page, so to know exactly if a <strong>-a</strong> switch is supported or if there is another switch that should be used when adding a user to a group.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarkis Karagozian</title>
		<link>http://www.g-loaded.eu/2005/11/06/manage-users-from-the-command-line/#comment-5120</link>
		<dc:creator>Sarkis Karagozian</dc:creator>
		<pubDate>Mon, 27 Nov 2006 03:56:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=71#comment-5120</guid>
		<description>As a beginner to Linux, I learned a lot from these commands, comments.
One comment I have:
Before adding a user to a group, we need to add/create a the group [group1]
in the example. i.e:
# groupadd group1    (then add username to group)
# usermod -G group1 username
Thanks</description>
		<content:encoded><![CDATA[<p>As a beginner to Linux, I learned a lot from these commands, comments.<br />
One comment I have:<br />
Before adding a user to a group, we need to add/create a the group [group1]<br />
in the example. i.e:</p>
<p># groupadd group1    (then add username to group)<br />
# usermod -G group1 username</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GNot</title>
		<link>http://www.g-loaded.eu/2005/11/06/manage-users-from-the-command-line/#comment-5014</link>
		<dc:creator>GNot</dc:creator>
		<pubDate>Sat, 04 Nov 2006 04:54:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=71#comment-5014</guid>
		<description>This is very interesting. I don&#039;t have a Fedora 3 installation handy, but I will try to investigate the &quot;-a&quot; switch issue and modify this document accordingly.
Thanks for your feedback.</description>
		<content:encoded><![CDATA[<p>This is very interesting. I don&#8217;t have a Fedora 3 installation handy, but I will try to investigate the &#8220;-a&#8221; switch issue and modify this document accordingly.<br />
Thanks for your feedback.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.g-loaded.eu/2005/11/06/manage-users-from-the-command-line/#comment-5010</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Fri, 03 Nov 2006 13:36:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=71#comment-5010</guid>
		<description>answered my own question.
omitting the -a just meant that the user was added to the new group. It didn&#039;t delete me from my home group.
so doing usermod -G psb svn
left me as a member of psb and svn groups. Not just psb as previously.</description>
		<content:encoded><![CDATA[<p>answered my own question.<br />
omitting the -a just meant that the user was added to the new group. It didn&#8217;t delete me from my home group.</p>
<p>so doing usermod -G psb svn</p>
<p>left me as a member of psb and svn groups. Not just psb as previously.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.g-loaded.eu/2005/11/06/manage-users-from-the-command-line/#comment-5009</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Fri, 03 Nov 2006 13:33:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=71#comment-5009</guid>
		<description>I get the same no -a option error when attempting this on Fedora Core 3 distro.
Any ideas what I should do instead?
Regards,
Paul</description>
		<content:encoded><![CDATA[<p>I get the same no -a option error when attempting this on Fedora Core 3 distro.</p>
<p>Any ideas what I should do instead?</p>
<p>Regards,</p>
<p>Paul</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.383 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-08 21:51:08 -->

