Some discussion on it here: <a href="http://www.linuxquestions.org/linux/answers/Networking/How_to_list_all_your_USERs">http://www.linuxquestions.org/linux/answers/Networking/How_to_list_all_your_USERs</a><div><br></div><div>
<a href="http://www.linuxquestions.org/linux/answers/Networking/How_to_list_all_your_USERs"></a>I did this s few years ago to pull out Active Directory users:</div><div><a href="http://david-halliday.co.uk/?Linux:Make_/home/">http://david-halliday.co.uk/?Linux:Make_/home/</a></div>
<div><a href="http://david-halliday.co.uk/?Linux:Make_/home/"></a> (I wanted them to have a /home on a linux box so they had FTP, SSH and (as a result of a public_html directory) HTTP web hosting easily configured for educational purposes. While that wbinfo command is for ad users there might be something else but I can&#39;t find it yet.</div>
<div><br></div><div>A short answer to your question could be something along the lines of:<br>sudo cat /etc/passwd | grep &#39;/home&#39; | cut -d : -f 1</div><div><br></div><div><br></div><div><div class="gmail_quote">On 24 September 2010 09:51, Evan Ingram <span dir="ltr">&lt;<a href="mailto:evan.ingram@cariss.co.uk">evan.ingram@cariss.co.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi all<br>
<br>
I always assumed managing users would be a lot simpler in linux, but im<br>
struggling to find an easy way to add 500+ users into groups. Got a<br>
couple of groups that I need all users to be a part of.<br>
<br>
#!/bin/sh<br>
<br>
for USER in userA userB userC userD userE; do<br>
  usermod -G USERS $USER<br>
done<br>
<br>
script above should do the trick, but then I&#39;d need to get a list of all<br>
my usernames in the correct format, ie userA userB userC, so i&#39;d have to<br>
use a combination of awk/sed/whatever on /etc/passwd. Is there an easier<br>
way?<br>
<br>
cheers<br>
<br>
<br>
_______________________________________________<br>
Kent mailing list<br>
<a href="mailto:Kent@mailman.lug.org.uk">Kent@mailman.lug.org.uk</a><br>
<a href="https://mailman.lug.org.uk/mailman/listinfo/kent" target="_blank">https://mailman.lug.org.uk/mailman/listinfo/kent</a><br>
</blockquote></div><br></div>