Thats a pretty ugly script, whats it actually trying to do?<br><br>first thing wrong is the quoting it should be '/profiles/' on the mkdir(/profiles/, 0755); line (do you realy want a profiles dir in /?)<br><br>and in chown($uid, $gid, /profiles/$name); it should be &quot;/profiles/$name&quot;
<br><br>a slightly better way&nbsp; using perls builtin pwent stuff might be like this:<br><br>start---------------------------------------------------------<br>#!/usr/bin/perl<br><br>use strict;<br>use warnings;<br><br>my $profile_dir = '/profiles/'; # do you realy want this? need to be root
<br>mkdir($profile_dir, 0755) or die &quot;cannot make dir $profile_dir: $!&quot;;<br><br>setpwent();<br>while (my ($name, $uid, $gid) = (getpwent())[0, 2, 3]) {<br>&nbsp; next unless $name =~ /^[\w\ \-\+]+$/;<br>&nbsp; my $name_dir = &quot;$profile_dir/$name&quot;;
<br>&nbsp; next if -e $name_dir;<br>&nbsp; mkdir ($name_dir, 0700) or die &quot;cannot make dir $name_dir: $!&quot;;<br>&nbsp; chown ($uid, $gid, $name_dir) or warn &quot;need to be root!: $!&quot;;<br>}<br>endpwent();<br>---------------------------------------------------------end
<br><br>but if you only want real users then add a<br><br>next if $uid &lt; 1000;<br><br>Don Jones<br>