<?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 Setup prompt from script in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/setup-prompt-from-script/m-p/5005760#M98676</link>
    <description>Hi,&lt;BR /&gt;When I "su" to root (I can't change the root .profile) I want to run the following to set things up the way I like....but it is not running.  Any ideas?&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;PS1="`whoami`@`uname -n`:\$PWD# ";export PS1&lt;BR /&gt;alias l="ls -la"&lt;BR /&gt;</description>
    <pubDate>Wed, 27 Sep 2006 09:21:48 GMT</pubDate>
    <dc:creator>Coolmar</dc:creator>
    <dc:date>2006-09-27T09:21:48Z</dc:date>
    <item>
      <title>Setup prompt from script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/setup-prompt-from-script/m-p/5005760#M98676</link>
      <description>Hi,&lt;BR /&gt;When I "su" to root (I can't change the root .profile) I want to run the following to set things up the way I like....but it is not running.  Any ideas?&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;PS1="`whoami`@`uname -n`:\$PWD# ";export PS1&lt;BR /&gt;alias l="ls -la"&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Sep 2006 09:21:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/setup-prompt-from-script/m-p/5005760#M98676</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2006-09-27T09:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Setup prompt from script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/setup-prompt-from-script/m-p/5005761#M98677</link>
      <description>Hi Coolmar,&lt;BR /&gt;&lt;BR /&gt;Are you typing:&lt;BR /&gt;$ su root&lt;BR /&gt;or&lt;BR /&gt;$ su - root&lt;BR /&gt;?&lt;BR /&gt;&lt;BR /&gt;PCS</description>
      <pubDate>Wed, 27 Sep 2006 09:24:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/setup-prompt-from-script/m-p/5005761#M98677</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-09-27T09:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Setup prompt from script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/setup-prompt-from-script/m-p/5005762#M98678</link>
      <description>su - root .... sorry, should have mentioned that.</description>
      <pubDate>Wed, 27 Sep 2006 09:25:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/setup-prompt-from-script/m-p/5005762#M98678</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2006-09-27T09:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Setup prompt from script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/setup-prompt-from-script/m-p/5005763#M98679</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;put your commands in a file 'my_settings' and then execute&lt;BR /&gt;&lt;BR /&gt;. /path/to/my_settings&lt;BR /&gt;&lt;BR /&gt;(there is a space between the dot and the pathname!).&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Wed, 27 Sep 2006 09:27:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/setup-prompt-from-script/m-p/5005763#M98679</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-09-27T09:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Setup prompt from script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/setup-prompt-from-script/m-p/5005764#M98680</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;You have al that you need.  Encapsulate your commands in a file as you show and when you have 'su'-ed to root, source (read) the file:&lt;BR /&gt;&lt;BR /&gt;$ su root&lt;BR /&gt;# . ./mythings&lt;BR /&gt;&lt;BR /&gt;Note the dot followed by a space, followed by your file's name.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 27 Sep 2006 09:29:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/setup-prompt-from-script/m-p/5005764#M98680</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-09-27T09:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Setup prompt from script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/setup-prompt-from-script/m-p/5005765#M98681</link>
      <description>You shouldn't be specifying a shebang (#!/path/to/shell) in the .profile, as it is sourced.&lt;BR /&gt;&lt;BR /&gt;Other than that, are you sure you're modifying root's .profile? vi '~/.profile' if you're logged in as root. Usually you will see lines like " echo "WARNING:  YOU ARE SUPERUSER !!\n"" -- do you see that warning when you log in as root?</description>
      <pubDate>Wed, 27 Sep 2006 09:29:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/setup-prompt-from-script/m-p/5005765#M98681</guid>
      <dc:creator>Jonathan Fife</dc:creator>
      <dc:date>2006-09-27T09:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Setup prompt from script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/setup-prompt-from-script/m-p/5005766#M98682</link>
      <description>Hello again,&lt;BR /&gt;&lt;BR /&gt;Note that you should never change root's shell from /sbin/sh.&lt;BR /&gt;&lt;BR /&gt;Why can't you change ~root/.profile?  As others have said, you should be able to place your customized settings in a separate file, and then source it by adding '. &lt;FILE&gt;' to the top of .profile.  If you really are not able to modify .profile, you could change /etc/profile to selectively source the settings file when the user is root.&lt;BR /&gt;&lt;BR /&gt;PCS&lt;/FILE&gt;</description>
      <pubDate>Wed, 27 Sep 2006 09:35:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/setup-prompt-from-script/m-p/5005766#M98682</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-09-27T09:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Setup prompt from script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/setup-prompt-from-script/m-p/5005767#M98683</link>
      <description>Can't change root's profile due to policy.  That's just the way it is here.&lt;BR /&gt;&lt;BR /&gt;I have it already in a script but didn't realize I had to put the "." then a space to run it.&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Wed, 27 Sep 2006 09:49:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/setup-prompt-from-script/m-p/5005767#M98683</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2006-09-27T09:49:49Z</dc:date>
    </item>
  </channel>
</rss>

