<?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: passwd in a script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914289#M827673</link>
    <description>Yep, I've just added a user as a test using a normal user and sam access that was configured using sam -r.</description>
    <pubDate>Mon, 25 Jul 2005 08:44:27 GMT</pubDate>
    <dc:creator>Gavin Clarke</dc:creator>
    <dc:date>2005-07-25T08:44:27Z</dc:date>
    <item>
      <title>passwd in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914285#M827669</link>
      <description>Wrote a sript for our helpdesk to use to add user to the system. I know this is not best practice, but we have the script set as user root and the security of the program set so it will run as root.  chmod 4750 'name of script'&lt;BR /&gt;&lt;BR /&gt;The script except when we run the part to add the password. We Permisiion denied.  In the script the lines say: &lt;BR /&gt;&lt;BR /&gt;passwd ?{newuser}&lt;BR /&gt;passwd -f ?{newuser}&lt;BR /&gt;&lt;BR /&gt;according to the man pages on passwd - A superuser whose effective user ID is 0 is allowed to change password. &lt;BR /&gt;I inserted id  with the right option and 0 was the uid. &lt;BR /&gt;&lt;BR /&gt;I run the script as root and it works fine. I run as another user I get the error. &lt;BR /&gt;Any suggestion????</description>
      <pubDate>Mon, 25 Jul 2005 08:15:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914285#M827669</guid>
      <dc:creator>Jim Tropiano_1</dc:creator>
      <dc:date>2005-07-25T08:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: passwd in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914286#M827670</link>
      <description>Hi Jim,&lt;BR /&gt;&lt;BR /&gt;I haven't got the solution to your problem;&lt;BR /&gt;But I think you should take a look at using a restricted SAM for your helpdesk. This way you can grant them rights to add users / change passwords / unlock users among other things. &lt;BR /&gt;&lt;BR /&gt;if this is not an option, then take a look at sudo&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Kasper</description>
      <pubDate>Mon, 25 Jul 2005 08:27:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914286#M827670</guid>
      <dc:creator>Kasper Hedensted</dc:creator>
      <dc:date>2005-07-25T08:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: passwd in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914287#M827671</link>
      <description>Have your script run "id" before the passwd command - verify that the EUID is correctly set.&lt;BR /&gt;&lt;BR /&gt;If it is not set, is the filesystem on which your script is stored mounted with nosuid option?  Check /etc/fstab and output of mount command.</description>
      <pubDate>Mon, 25 Jul 2005 08:37:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914287#M827671</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2005-07-25T08:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: passwd in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914288#M827672</link>
      <description>Our helpdesk do passwords.&lt;BR /&gt;&lt;BR /&gt;sam -r is the way we got it up and running.</description>
      <pubDate>Mon, 25 Jul 2005 08:39:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914288#M827672</guid>
      <dc:creator>Gavin Clarke</dc:creator>
      <dc:date>2005-07-25T08:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: passwd in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914289#M827673</link>
      <description>Yep, I've just added a user as a test using a normal user and sam access that was configured using sam -r.</description>
      <pubDate>Mon, 25 Jul 2005 08:44:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914289#M827673</guid>
      <dc:creator>Gavin Clarke</dc:creator>
      <dc:date>2005-07-25T08:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: passwd in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914290#M827674</link>
      <description>well, this may not be the answer you are looking for but instead of the help desk create a new password for each user, you can set few pre-expired passwords while you are running as root on some dummy accounts. Copy the hashed (encrypted) password strings into a secure file. And instead of running these two passwd commands, you can let the helpdesk rep select from these preset passwords and put their selection (in encrypted form of course) as the initial password to the newuse with command&lt;BR /&gt;&lt;BR /&gt;/usr/sam/lbin/usermod.sam -p "Dx3zsaZS3q22." username&lt;BR /&gt;&lt;BR /&gt;by changing the password hash to your own selected string.&lt;BR /&gt;&lt;BR /&gt;hope this helps</description>
      <pubDate>Mon, 25 Jul 2005 11:53:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914290#M827674</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2005-07-25T11:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: passwd in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914291#M827675</link>
      <description>We have our help desk use restricted SAM to run a script.  The script controlls the userids that can be reset or modified.  i.e. limit the ids so ids like root or any others specified cannot be changed.</description>
      <pubDate>Mon, 25 Jul 2005 14:10:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914291#M827675</guid>
      <dc:creator>Tim Nelson</dc:creator>
      <dc:date>2005-07-25T14:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: passwd in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914292#M827676</link>
      <description>Thanks for all the responses.  I got it to work for waht we needed.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks to all.</description>
      <pubDate>Thu, 28 Jul 2005 14:52:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914292#M827676</guid>
      <dc:creator>Jim Tropiano_1</dc:creator>
      <dc:date>2005-07-28T14:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: passwd in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914293#M827677</link>
      <description>Thanks the script works</description>
      <pubDate>Thu, 28 Jul 2005 14:53:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-in-a-script/m-p/4914293#M827677</guid>
      <dc:creator>Jim Tropiano_1</dc:creator>
      <dc:date>2005-07-28T14:53:07Z</dc:date>
    </item>
  </channel>
</rss>

