<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: script for deleting users in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-deleting-users/m-p/2700675#M57809</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;As already stated by Ceesjan, start investigating using NIS+ and a NFS mounted filesystem for the users home directories.&lt;BR /&gt;&lt;BR /&gt;That would be the easiest way to manage user adding and deleting.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Clemens</description>
    <pubDate>Wed, 10 Apr 2002 10:29:23 GMT</pubDate>
    <dc:creator>Clemens van Everdingen</dc:creator>
    <dc:date>2002-04-10T10:29:23Z</dc:date>
    <item>
      <title>script for deleting users</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-deleting-users/m-p/2700671#M57805</link>
      <description>The requirement is for a daily method to gather the /etc/passwd files from 10 remote systems to store on server "A".  When a user departs the organization a script is then to be run to determine which systems require deletion of the user's account and group memberships.  I presume the files are to be stored on server A to enable the updated passwd file(s) to be modified and ftp'd to affected systems.  I've been clued in to use a series of commands in a .netrc file to gather the passwd files.  When it comes to deleting lines from appropriate passwd files stored on server A I am way behind the power curve.  As I delve through the usual shell textbooks searching for the light, I again spin my wheels at scripting something that seems simple.  I also wonder about modifications to the etc/group and other files, but those issues may arise on another day.  Thank-you for any direction you may provide.  Starting anew after 44 years is a bear.</description>
      <pubDate>Wed, 10 Apr 2002 09:59:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-deleting-users/m-p/2700671#M57805</guid>
      <dc:creator>Raymond Ford</dc:creator>
      <dc:date>2002-04-10T09:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: script for deleting users</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-deleting-users/m-p/2700672#M57806</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt; if you know the userids of the users to be removed , you can do it by simply using the &lt;BR /&gt;"userdel" command&lt;BR /&gt;  userdel loginid&lt;BR /&gt;  userdel -r loginid (if you want to remove the users home directory too).&lt;BR /&gt;&lt;BR /&gt;You can run this through remsh  :&lt;BR /&gt;A simple format would be:&lt;BR /&gt;for i in `cat hostnames`&lt;BR /&gt;do&lt;BR /&gt; remsh &lt;HOST&gt; userdel -r loginid &lt;BR /&gt; if [ $? -eq 0 ]&lt;BR /&gt; then&lt;BR /&gt;   echo "user $loginid removed from $host" &amp;gt;&amp;gt;logfile&lt;BR /&gt; else&lt;BR /&gt;   echo " user $loginid not removed from $host. User may not be present on the system" &amp;gt;&amp;gt;faillog&lt;BR /&gt;  fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTh&lt;BR /&gt;raj&lt;/HOST&gt;</description>
      <pubDate>Wed, 10 Apr 2002 10:07:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-deleting-users/m-p/2700672#M57806</guid>
      <dc:creator>Roger Baptiste</dc:creator>
      <dc:date>2002-04-10T10:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: script for deleting users</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-deleting-users/m-p/2700673#M57807</link>
      <description>Hi,&lt;BR /&gt;The problem is not in collecting the passwd files (as you mentioned, with ftp) or deleting the users (I would generate "userdel" scripts - and not forget to remove/move the files/directories these users had - ftp those back to the appropriate systems and execute them there, rather than start messing with the passwd files).&lt;BR /&gt;However, the problem is in scheduling all those things to happen sequentially spanning several different servers. For that I would use Control-M, but that's an "external" software ... I don't know if you have a "Cross Server Job Scheduler" or have to rely on good old crontab. In the latter case it's going to be tricky.&lt;BR /&gt;&lt;BR /&gt;Hope this gets you started,&lt;BR /&gt;Tom Geudens</description>
      <pubDate>Wed, 10 Apr 2002 10:12:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-deleting-users/m-p/2700673#M57807</guid>
      <dc:creator>Tom Geudens</dc:creator>
      <dc:date>2002-04-10T10:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: script for deleting users</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-deleting-users/m-p/2700674#M57808</link>
      <description>My answer will not help you on the short term, but for the long(er) term it might be an idea to start to think about NIS.&lt;BR /&gt;Besides /etc/passwd and /etc/group modifications, did you also think about what to do with the /home directory of the user to be deleted..? Putting homedirecoties centralized using automounter (autofs) is an other thing to think about.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ceesjan</description>
      <pubDate>Wed, 10 Apr 2002 10:22:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-deleting-users/m-p/2700674#M57808</guid>
      <dc:creator>Ceesjan van Hattum</dc:creator>
      <dc:date>2002-04-10T10:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: script for deleting users</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-deleting-users/m-p/2700675#M57809</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;As already stated by Ceesjan, start investigating using NIS+ and a NFS mounted filesystem for the users home directories.&lt;BR /&gt;&lt;BR /&gt;That would be the easiest way to manage user adding and deleting.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Clemens</description>
      <pubDate>Wed, 10 Apr 2002 10:29:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-deleting-users/m-p/2700675#M57809</guid>
      <dc:creator>Clemens van Everdingen</dc:creator>
      <dc:date>2002-04-10T10:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: script for deleting users</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-deleting-users/m-p/2700676#M57810</link>
      <description>Thank-you all for your suggestions.  This assignment never made much sense to me.  Why just the passwd files?    We are neither talking about a large number of servers, nor about user accounts that need to be deleted with any frequency.  RajMan, I neglected to mention that remsh is not to be used for "security" reasons.  Makes me wonder why I have root privileges.  I'll get to work with .netrc and look into NIS.  You all deserve 10 points in my book, but I try to stick by the conventions ;-)</description>
      <pubDate>Wed, 10 Apr 2002 11:54:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-deleting-users/m-p/2700676#M57810</guid>
      <dc:creator>Raymond Ford</dc:creator>
      <dc:date>2002-04-10T11:54:18Z</dc:date>
    </item>
  </channel>
</rss>

