<?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 Switch user in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/switch-user/m-p/3234714#M748955</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Do we have an option where the password can be supplied in the same line while we try to switch user ?&lt;BR /&gt;&lt;BR /&gt;I need to incorporate this in a script. Please help !&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Ex :- su - user1 ( Do we have an option so that we can enter the password on the same line) like &lt;BR /&gt;su - user1 - password&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Gurunath</description>
    <pubDate>Wed, 31 Mar 2004 00:59:11 GMT</pubDate>
    <dc:creator>Gurunath</dc:creator>
    <dc:date>2004-03-31T00:59:11Z</dc:date>
    <item>
      <title>Switch user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/switch-user/m-p/3234714#M748955</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Do we have an option where the password can be supplied in the same line while we try to switch user ?&lt;BR /&gt;&lt;BR /&gt;I need to incorporate this in a script. Please help !&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Ex :- su - user1 ( Do we have an option so that we can enter the password on the same line) like &lt;BR /&gt;su - user1 - password&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Gurunath</description>
      <pubDate>Wed, 31 Mar 2004 00:59:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/switch-user/m-p/3234714#M748955</guid>
      <dc:creator>Gurunath</dc:creator>
      <dc:date>2004-03-31T00:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Switch user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/switch-user/m-p/3234715#M748956</link>
      <description>You can use expect for the same (But I would not recommend as it is a potential security risk).&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Tcl/expect-5.39/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Tcl/expect-5.39/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://expect.nist.gov/" target="_blank"&gt;http://expect.nist.gov/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;-Karthik S S&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Mar 2004 01:06:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/switch-user/m-p/3234715#M748956</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2004-03-31T01:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Switch user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/switch-user/m-p/3234716#M748957</link>
      <description>Thanks for your instant reply.&lt;BR /&gt;&lt;BR /&gt;I was looking for any option that I can use with in su to address the requirement.&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;Gurunath</description>
      <pubDate>Wed, 31 Mar 2004 01:17:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/switch-user/m-p/3234716#M748957</guid>
      <dc:creator>Gurunath</dc:creator>
      <dc:date>2004-03-31T01:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Switch user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/switch-user/m-p/3234717#M748958</link>
      <description>Then fine. Refer to Sridhar's post in the following thread,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0x54e2c6af36b7d5118ff10090279cd0f9%2C00.html&amp;amp;admit=716493758+1080715221070+28353475" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0x54e2c6af36b7d5118ff10090279cd0f9%2C00.html&amp;amp;admit=716493758+1080715221070+28353475&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Ex:&lt;BR /&gt;#!/wherever/expect -f&lt;BR /&gt;&lt;BR /&gt;set prompt "(%|#|\\$|&amp;gt;)"&lt;BR /&gt;&lt;BR /&gt;set timeout 10&lt;BR /&gt;&lt;BR /&gt;spawn su - username&lt;BR /&gt;expect "password "&lt;BR /&gt;send "password\r"&lt;BR /&gt;expect "$prompt"&lt;BR /&gt;send "exit\r"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Karthik S S&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Mar 2004 01:43:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/switch-user/m-p/3234717#M748958</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2004-03-31T01:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Switch user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/switch-user/m-p/3234718#M748959</link>
      <description>A far more secure way to do this is to create a captive key under SSH. You could make it so that your user could only execute that single command as the target user, without the need for a password. The beauty of this is that you can even do it from another machine, and no passwords are ever required.&lt;BR /&gt;</description>
      <pubDate>Thu, 01 Apr 2004 03:58:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/switch-user/m-p/3234718#M748959</guid>
      <dc:creator>Andrew Cowan</dc:creator>
      <dc:date>2004-04-01T03:58:51Z</dc:date>
    </item>
  </channel>
</rss>

