<?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: User remove script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/user-remove-script/m-p/4274991#M334802</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;For this type of multiple server script the best way is to put your script into every server /home directory or other location then run your script from your master server.&lt;BR /&gt;&lt;BR /&gt;for i in `cat serverlist.txt`&lt;BR /&gt;do&lt;BR /&gt;ssh $i /home/scriptname.sh&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Suraj.</description>
    <pubDate>Wed, 24 Sep 2008 10:08:42 GMT</pubDate>
    <dc:creator>Suraj K Sankari</dc:creator>
    <dc:date>2008-09-24T10:08:42Z</dc:date>
    <item>
      <title>User remove script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-remove-script/m-p/4274988#M334799</link>
      <description>&lt;!--!*#--&gt;Hello friends,&lt;BR /&gt;&lt;BR /&gt;I have created one user remove script which is run on one stepping stone linux server. I have my athourisation key on all the remote servers. but when i run this script it hanged. could you help me. here is the script which i have created:&lt;BR /&gt;#more userdel&lt;BR /&gt;for i in host&lt;BR /&gt;do&lt;BR /&gt;ssh $i /appl/tsu/bin/sudo userdel -r $1&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Sep 2008 07:32:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-remove-script/m-p/4274988#M334799</guid>
      <dc:creator>SagarOne</dc:creator>
      <dc:date>2008-09-24T07:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: User remove script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-remove-script/m-p/4274989#M334800</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;where do you get host variable's value from ? also if you first ssh to servers it'll ask for authenticity. you can also put #!/usr/bin/bash -x for debugging to reliase where it hangs.&lt;BR /&gt;&lt;BR /&gt;Kenan.</description>
      <pubDate>Wed, 24 Sep 2008 07:48:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-remove-script/m-p/4274989#M334800</guid>
      <dc:creator>Kenan Erdey</dc:creator>
      <dc:date>2008-09-24T07:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: User remove script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-remove-script/m-p/4274990#M334801</link>
      <description>Also set PATH in your script or use full path names for userdel.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;ivan</description>
      <pubDate>Wed, 24 Sep 2008 09:12:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-remove-script/m-p/4274990#M334801</guid>
      <dc:creator>Ivan Krastev</dc:creator>
      <dc:date>2008-09-24T09:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: User remove script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-remove-script/m-p/4274991#M334802</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;For this type of multiple server script the best way is to put your script into every server /home directory or other location then run your script from your master server.&lt;BR /&gt;&lt;BR /&gt;for i in `cat serverlist.txt`&lt;BR /&gt;do&lt;BR /&gt;ssh $i /home/scriptname.sh&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Suraj.</description>
      <pubDate>Wed, 24 Sep 2008 10:08:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-remove-script/m-p/4274991#M334802</guid>
      <dc:creator>Suraj K Sankari</dc:creator>
      <dc:date>2008-09-24T10:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: User remove script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-remove-script/m-p/4274992#M334803</link>
      <description>Hey;&lt;BR /&gt;&lt;BR /&gt;First, it's generally a bad idea to call a script the same name as a OS binary.  The reason is if your path is messed up, it will find the script before the binary.  If you want to call it something close, use a capital letter or call it userrm - something along those lines.&lt;BR /&gt;&lt;BR /&gt;There are a couple of possibilities of what's causing the issue.  &lt;BR /&gt;&lt;BR /&gt;1.  Issue with the user: $1.  Set the $1 variable to *something* in your script:&lt;BR /&gt;&lt;BR /&gt;User=$1&lt;BR /&gt;&lt;BR /&gt;I try to avoid using the positional variables, particularly in loops as they're pretty easy to stomp.&lt;BR /&gt;&lt;BR /&gt;2.  sudo authentication.  Unless you're using NOPASSWORD option (always a bad idea), the sudo will ask for your password every 5 minutes.  You can initially populate the cache by looping through the hosts and doing something like sudo ls -ld /tmp&lt;BR /&gt;&lt;BR /&gt;3.  If the user doesn't exist on the remote system, it may cause issues with your script.  I would think it'd just display an error message..&lt;BR /&gt;&lt;BR /&gt;Those are the things I'd check...&lt;BR /&gt;&lt;BR /&gt;Doug</description>
      <pubDate>Wed, 24 Sep 2008 12:18:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-remove-script/m-p/4274992#M334803</guid>
      <dc:creator>Doug O'Leary</dc:creator>
      <dc:date>2008-09-24T12:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: User remove script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-remove-script/m-p/4274993#M334804</link>
      <description>Thanks to all&lt;BR /&gt;but i have run the script in debug mode, o/p is here: &lt;BR /&gt;&lt;BR /&gt;# ksh -x ./userdel user&lt;BR /&gt;+ ssh server /appl/tsu/bin/sudo user&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;after that it hanged,user exist on the server, also when i run the following cmd, it run sucessfully:&lt;BR /&gt;&lt;BR /&gt;ssh server /appl/tsu/bin/sudo userdel -r user&lt;BR /&gt;&lt;BR /&gt;dont know why its not running when putting on script &amp;amp; passing value.</description>
      <pubDate>Thu, 25 Sep 2008 02:21:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-remove-script/m-p/4274993#M334804</guid>
      <dc:creator>SagarOne</dc:creator>
      <dc:date>2008-09-25T02:21:25Z</dc:date>
    </item>
  </channel>
</rss>

