<?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: setting up a jail user in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144605#M156151</link>
    <description>Good news guys...&lt;BR /&gt;&lt;BR /&gt;I found in Internet a document related to this issue.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.tjw.org/chroot-login-HOWTO/" target="_blank"&gt;http://www.tjw.org/chroot-login-HOWTO/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;In this doc there are some interesting remarks about needed libraries:&lt;BR /&gt;&lt;BR /&gt;NOTE: at least with Slackware, for some reason the library /lib/libnss_compat.so.2 is not listed as a required lib for su, but it IS needed!&lt;BR /&gt;NOTE: On RedHat 7.x systems, not only do you have to build a new su binary but you must copy /lib/libnss_files.so.2 and /lib/libnsl.so.1 (as well as /lib/libnss_compat.so.2) to the chroot /lib directory even though they don't show up in 'ldd su'. Thanks to Arnstein Ressem and others for figuring this out.&lt;BR /&gt;&lt;BR /&gt;Then I copied libnss_files.1 into the jail root file system... then errors reported by su, id and grpck commands in jail environment (and listed above) disappeared.&lt;BR /&gt;&lt;BR /&gt;I suspect if other methods for name resolution are used, other libnss_* libraries are required.</description>
    <pubDate>Tue, 16 Dec 2003 08:46:48 GMT</pubDate>
    <dc:creator>Jdamian</dc:creator>
    <dc:date>2003-12-16T08:46:48Z</dc:date>
    <item>
      <title>setting up a jail user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144597#M156143</link>
      <description>Hi.&lt;BR /&gt;&lt;BR /&gt;I'm trying to set up a jail user (for instance, "mark").&lt;BR /&gt;&lt;BR /&gt;I created /jail tree in which I added some directories and files as usr, var, etc, tmp, etc/profile, etc/passwd, etc/group, usr/bin/su (and its shared libraries), sbin/sh.&lt;BR /&gt;&lt;BR /&gt;I installed sudo to run:&lt;BR /&gt;&lt;BR /&gt;sudo /usr/sbin/chroot /jail su - mark&lt;BR /&gt;&lt;BR /&gt;but 'su' command reports:&lt;BR /&gt;&lt;BR /&gt;su: Unknown id: mark&lt;BR /&gt;&lt;BR /&gt;I copied /etc/passwd and /etc/group files into the jail tree.&lt;BR /&gt;&lt;BR /&gt;Any ideas ?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Dec 2003 06:48:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144597#M156143</guid>
      <dc:creator>Jdamian</dc:creator>
      <dc:date>2003-12-15T06:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a jail user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144598#M156144</link>
      <description>Not actually tried this ever but I would have thought that the idea would be to put &lt;BR /&gt; &lt;BR /&gt;"sudo /usr/sbin/chroot /jail /usr/bin/sh"&lt;BR /&gt; &lt;BR /&gt;in Mark's .profile and not use the su command</description>
      <pubDate>Mon, 15 Dec 2003 07:02:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144598#M156144</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-12-15T07:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a jail user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144599#M156145</link>
      <description>Looks correct.&lt;BR /&gt;&lt;BR /&gt;What are the permission of passwd and groups ?&lt;BR /&gt;&lt;BR /&gt;  Massimo</description>
      <pubDate>Mon, 15 Dec 2003 07:40:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144599#M156145</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-12-15T07:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a jail user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144600#M156146</link>
      <description>permissions for passwd and group files are 444&lt;BR /&gt;&lt;BR /&gt;Mark, I want to use 'su' command in order to make jail user log into the system as a default   user (HOME dir, .profile,), not as a jail user.</description>
      <pubDate>Mon, 15 Dec 2003 08:55:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144600#M156146</guid>
      <dc:creator>Jdamian</dc:creator>
      <dc:date>2003-12-15T08:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a jail user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144601#M156147</link>
      <description>Hi,&lt;BR /&gt; &lt;BR /&gt;Presumably, if they were running a chrooted shell from their .profile then all the environments would be set up as you wanted.  &lt;BR /&gt; &lt;BR /&gt;However, where exactly are you issuing this command then?  Because if you have the su - mark in Marks .profile you might have a bit of a circular problem :)&lt;BR /&gt; &lt;BR /&gt;</description>
      <pubDate>Mon, 15 Dec 2003 09:01:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144601#M156147</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-12-15T09:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a jail user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144602#M156148</link>
      <description>No Mark, there is no circular problem.&lt;BR /&gt;&lt;BR /&gt;When user logs into the system, its /home/mark/.profile runs sudo command. Sudo command runs 'su - mark' but this 'su' command is executed into the jail tree (not into the real root tree), in which there is a /home/mark dir containing another .profile.</description>
      <pubDate>Mon, 15 Dec 2003 09:06:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144602#M156148</guid>
      <dc:creator>Jdamian</dc:creator>
      <dc:date>2003-12-15T09:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a jail user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144603#M156149</link>
      <description>Aaaah, I see :)&lt;BR /&gt; &lt;BR /&gt;I told you I'd never tried this before :)&lt;BR /&gt; &lt;BR /&gt;In that case, I'd suspect that the password file you are using might have a typo in it or something.  Maybe "sudo /usr/sbin/chroot /jail pwck" might help.</description>
      <pubDate>Mon, 15 Dec 2003 09:09:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144603#M156149</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-12-15T09:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a jail user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144604#M156150</link>
      <description>'pwck' reports the same results executed as normal root and as jail root. But grpck doesn't.&lt;BR /&gt;&lt;BR /&gt;If grpck is executed as normal root, no error is reported. But if jail root runs 'grpck', a lot of errors are reported. It looks like grpck doesn't recognize users listed in grpck. An example of this error message is:&lt;BR /&gt;&lt;BR /&gt;root::0:root&lt;BR /&gt;        root - Logname not found in password file&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;other::1:root,hpdb&lt;BR /&gt;        root - Logname not found in password file&lt;BR /&gt;        hpdb - Logname not found in password file&lt;BR /&gt;&lt;BR /&gt;Moreover, if 'id' is executed by jail root, group names aren't displayed:&lt;BR /&gt;&lt;BR /&gt;# id&lt;BR /&gt;uid=0() gid=3() groups=0()&lt;BR /&gt;&lt;BR /&gt;('id' executed by normal root, is OK)&lt;BR /&gt;&lt;BR /&gt;I think grpck and id commands uses something else that is not available in jail tree but I cannot guess what it is...</description>
      <pubDate>Mon, 15 Dec 2003 10:42:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144604#M156150</guid>
      <dc:creator>Jdamian</dc:creator>
      <dc:date>2003-12-15T10:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a jail user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144605#M156151</link>
      <description>Good news guys...&lt;BR /&gt;&lt;BR /&gt;I found in Internet a document related to this issue.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.tjw.org/chroot-login-HOWTO/" target="_blank"&gt;http://www.tjw.org/chroot-login-HOWTO/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;In this doc there are some interesting remarks about needed libraries:&lt;BR /&gt;&lt;BR /&gt;NOTE: at least with Slackware, for some reason the library /lib/libnss_compat.so.2 is not listed as a required lib for su, but it IS needed!&lt;BR /&gt;NOTE: On RedHat 7.x systems, not only do you have to build a new su binary but you must copy /lib/libnss_files.so.2 and /lib/libnsl.so.1 (as well as /lib/libnss_compat.so.2) to the chroot /lib directory even though they don't show up in 'ldd su'. Thanks to Arnstein Ressem and others for figuring this out.&lt;BR /&gt;&lt;BR /&gt;Then I copied libnss_files.1 into the jail root file system... then errors reported by su, id and grpck commands in jail environment (and listed above) disappeared.&lt;BR /&gt;&lt;BR /&gt;I suspect if other methods for name resolution are used, other libnss_* libraries are required.</description>
      <pubDate>Tue, 16 Dec 2003 08:46:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-up-a-jail-user/m-p/3144605#M156151</guid>
      <dc:creator>Jdamian</dc:creator>
      <dc:date>2003-12-16T08:46:48Z</dc:date>
    </item>
  </channel>
</rss>

