<?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 /etc/passwd Startup-Program in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-startup-program/m-p/2500979#M20882</link>
    <description>Env : HP-UX 10.20, all users using /usr/bin/csh as start-up shell. NON-trusted system.&lt;BR /&gt;&lt;BR /&gt;What is the syntax for the last field of the /etc/passwd (the Startup-Program) such that : it will execute a script e.g. /usr/local/file1.sh, &amp;amp; then specifiy that the User's startup shell is /usr/bin/csh ? The user should be shown the normal CDE Workspc after login.&lt;BR /&gt;&lt;BR /&gt;Must "file1.sh" be a C-Shell script or can it be a POSIX shell script ?</description>
    <pubDate>Mon, 05 Mar 2001 15:16:19 GMT</pubDate>
    <dc:creator>Kong Kian Chay</dc:creator>
    <dc:date>2001-03-05T15:16:19Z</dc:date>
    <item>
      <title>/etc/passwd Startup-Program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-startup-program/m-p/2500979#M20882</link>
      <description>Env : HP-UX 10.20, all users using /usr/bin/csh as start-up shell. NON-trusted system.&lt;BR /&gt;&lt;BR /&gt;What is the syntax for the last field of the /etc/passwd (the Startup-Program) such that : it will execute a script e.g. /usr/local/file1.sh, &amp;amp; then specifiy that the User's startup shell is /usr/bin/csh ? The user should be shown the normal CDE Workspc after login.&lt;BR /&gt;&lt;BR /&gt;Must "file1.sh" be a C-Shell script or can it be a POSIX shell script ?</description>
      <pubDate>Mon, 05 Mar 2001 15:16:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-startup-program/m-p/2500979#M20882</guid>
      <dc:creator>Kong Kian Chay</dc:creator>
      <dc:date>2001-03-05T15:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd Startup-Program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-startup-program/m-p/2500980#M20883</link>
      <description>What I would be tempted to do is leave the passwd file alone and put the script that you want to be executed in the users .cshrc file.  That way you still get the benefit of the .cshrc file being sources and the environment being set up.</description>
      <pubDate>Mon, 05 Mar 2001 15:30:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-startup-program/m-p/2500980#M20883</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2001-03-05T15:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd Startup-Program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-startup-program/m-p/2500981#M20884</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Simply execute your script as the last line of your profile (.login) and leave /usr/bin/csh as the user's shell in /etc/passwd.  The script you choose should have its shell interpreter specified in the heading, like:&lt;BR /&gt;&lt;BR /&gt;#!usr/bin/sh #...for Posix...&lt;BR /&gt;&lt;BR /&gt;Your script will run and when done, you will drop into the normal shell, in this case, your csh shell.&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Mar 2001 15:31:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-startup-program/m-p/2500981#M20884</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-03-05T15:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd Startup-Program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-startup-program/m-p/2500982#M20885</link>
      <description>I think the "shell" specified in /etc/passwd must be a codefile (compiled program), and cannot be a script. You can just use a little C-program that starts you file1.sh:&lt;BR /&gt;main() {&lt;BR /&gt;#include &lt;UNISTD.H&gt;&lt;BR /&gt;&lt;BR /&gt;   (void) setuid((uid_t) 0);&lt;BR /&gt;    execlp("file1.sh", "file1.sh", (char *)0&lt;BR /&gt;);&lt;BR /&gt;}           &lt;BR /&gt;(if necessary use absolute path to file1.sh)                    &lt;BR /&gt;Jacques&lt;/UNISTD.H&gt;</description>
      <pubDate>Tue, 06 Mar 2001 07:13:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-startup-program/m-p/2500982#M20885</guid>
      <dc:creator>Jacques Simon</dc:creator>
      <dc:date>2001-03-06T07:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd Startup-Program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-startup-program/m-p/2500983#M20886</link>
      <description>If you replace /usr/bin/csh in /etc/passwd with /usr/local/file1.sh it could look like:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/csh&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;/usr/bin/csh</description>
      <pubDate>Tue, 06 Mar 2001 07:38:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-startup-program/m-p/2500983#M20886</guid>
      <dc:creator>Tommy Palo</dc:creator>
      <dc:date>2001-03-06T07:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd Startup-Program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-startup-program/m-p/2500984#M20887</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;The startup file in /etc/passwd can be a script.  I would use&lt;BR /&gt;&lt;BR /&gt;exec  /usr/bin/csh&lt;BR /&gt;&lt;BR /&gt;as the last line, if you must execute the script first.  As has been pointed out, though, it will probably be better to execute the script from the user's .login file.&lt;BR /&gt;&lt;BR /&gt;If you replace /usr/bin/csh with another script in /etc/passwd, you may consider creating/updating /etc/shells or else the user may not be able to access his/her account via ftp.&lt;BR /&gt;&lt;BR /&gt;--Bruce</description>
      <pubDate>Tue, 06 Mar 2001 18:59:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-startup-program/m-p/2500984#M20887</guid>
      <dc:creator>Bruce Regittko_1</dc:creator>
      <dc:date>2001-03-06T18:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd Startup-Program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-startup-program/m-p/2500985#M20888</link>
      <description>Thanks for all the suggestions. I will listen to all the expert advice &amp;amp; refrain from playing around with the start-up shell for /etc/passwd.&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Mar 2001 09:15:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-startup-program/m-p/2500985#M20888</guid>
      <dc:creator>Kong Kian Chay</dc:creator>
      <dc:date>2001-03-07T09:15:34Z</dc:date>
    </item>
  </channel>
</rss>

