<?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: Avoid users to remove the .profile in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046085#M135397</link>
    <description>stefan,&lt;BR /&gt;&lt;BR /&gt;try this :&lt;BR /&gt;&lt;BR /&gt;mv .profile /tmp/.profile&lt;BR /&gt;cp /tmp.profile .profile&lt;BR /&gt;vi .profile&lt;BR /&gt;chmod 444 .profile&lt;BR /&gt;chown root:sys .profile&lt;BR /&gt;&lt;BR /&gt;and noone will ever notice the changes you made ;-)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 11 Aug 2003 11:42:51 GMT</pubDate>
    <dc:creator>hein coulier</dc:creator>
    <dc:date>2003-08-11T11:42:51Z</dc:date>
    <item>
      <title>Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046075#M135387</link>
      <description>How can I avoid that a user is deleting his own .profile form his home dir ?&lt;BR /&gt;&lt;BR /&gt;Sticky bit is not the solution. I tested this.</description>
      <pubDate>Mon, 11 Aug 2003 09:10:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046075#M135387</guid>
      <dc:creator>Clemens van Everdingen</dc:creator>
      <dc:date>2003-08-11T09:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046076#M135388</link>
      <description>Hi,&lt;BR /&gt;assigning the root:bin ownership, and permission rrr ?&lt;BR /&gt;&lt;BR /&gt;   Massimo</description>
      <pubDate>Mon, 11 Aug 2003 09:16:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046076#M135388</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-08-11T09:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046077#M135389</link>
      <description>I believe the only way to do this is make the permissions on the users home dir 570 - ie. they do not own their own directory, or else they can remove .profile - even if it is owned by root and not writeable by anyone or a link. Any user who owns their own dir can always delete anything in it.&lt;BR /&gt;&lt;BR /&gt;The user will be able to create files in their home dir by using the group write permission, but will allow others in the same group to enter their directory and do likewise. Perhaps the user who you want to stop removing their .profile should have a group all of thier own.&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Aug 2003 09:18:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046077#M135389</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2003-08-11T09:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046078#M135390</link>
      <description>Stefan,&lt;BR /&gt;&lt;BR /&gt;I already found this solution. I hoped someone has found another way around :)&lt;BR /&gt;&lt;BR /&gt;Too bad..... this is a nice feature of HP-UX.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Clemens</description>
      <pubDate>Mon, 11 Aug 2003 09:24:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046078#M135390</guid>
      <dc:creator>Clemens van Everdingen</dc:creator>
      <dc:date>2003-08-11T09:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046079#M135391</link>
      <description>Stefan is correct,only by changing the $homedir&lt;BR /&gt;to read-only.Otherwise user can do whatever he likes.Another options are : using aliases,changing rm binary to point to some another script with conditions checks or (thats a wild one :)) mount read-only .profile&lt;BR /&gt;from some place.</description>
      <pubDate>Mon, 11 Aug 2003 09:26:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046079#M135391</guid>
      <dc:creator>Zeev Schultz</dc:creator>
      <dc:date>2003-08-11T09:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046080#M135392</link>
      <description>Surely setting the home dir to 570 is not "practical"&lt;BR /&gt;1 - the user will not be able to write to their home dir&lt;BR /&gt;2 - if the user is in the "group" then they can/will do chmod on their home dir.&lt;BR /&gt;&lt;BR /&gt;I think the only way is to set the permissions of the .profile to 444 (read,read, read) &amp;amp; the ownership root:sys.&lt;BR /&gt;&lt;BR /&gt;To me this is an upside down question, usually security people will be saying "How do we stop people creating .profiles, as it is a security risk"!&lt;BR /&gt;&lt;BR /&gt;Just my 0.02???&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Tim</description>
      <pubDate>Mon, 11 Aug 2003 11:05:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046080#M135392</guid>
      <dc:creator>Tim D Fulford</dc:creator>
      <dc:date>2003-08-11T11:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046081#M135393</link>
      <description>Time solution seems right to me. Giving 570 to hiome dir will not serve purpose if user is in group.&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Aug 2003 11:18:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046081#M135393</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2003-08-11T11:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046082#M135394</link>
      <description>Massimo and Tim:&lt;BR /&gt;&lt;BR /&gt;Removing write permission to a file doesn't prevent removing from directory.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Aug 2003 11:22:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046082#M135394</guid>
      <dc:creator>Jdamian</dc:creator>
      <dc:date>2003-08-11T11:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046083#M135395</link>
      <description>Tim,&lt;BR /&gt;&lt;BR /&gt;1. If the permission are 570 on the users home dir and he belongs to the group that has rwx then he CAN write to his home dir. This is what I said in my earlier reply. &lt;BR /&gt;&lt;BR /&gt;2. If the user does NOT own his home dir then he CANNOT change its ownership, so .profile will remain safe and undeleteable (if owned by root:sys and permissions 444).&lt;BR /&gt;&lt;BR /&gt;It is a good solution, and works. Try it yourself.&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Aug 2003 11:23:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046083#M135395</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2003-08-11T11:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046084#M135396</link>
      <description>ACL should be useful in this situation.</description>
      <pubDate>Mon, 11 Aug 2003 11:25:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046084#M135396</guid>
      <dc:creator>Jdamian</dc:creator>
      <dc:date>2003-08-11T11:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046085#M135397</link>
      <description>stefan,&lt;BR /&gt;&lt;BR /&gt;try this :&lt;BR /&gt;&lt;BR /&gt;mv .profile /tmp/.profile&lt;BR /&gt;cp /tmp.profile .profile&lt;BR /&gt;vi .profile&lt;BR /&gt;chmod 444 .profile&lt;BR /&gt;chown root:sys .profile&lt;BR /&gt;&lt;BR /&gt;and noone will ever notice the changes you made ;-)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Aug 2003 11:42:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046085#M135397</guid>
      <dc:creator>hein coulier</dc:creator>
      <dc:date>2003-08-11T11:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046086#M135398</link>
      <description>Stefan&lt;BR /&gt;&lt;BR /&gt;Hi... I did not appriciate the subtlties of your reply!!!&lt;BR /&gt;&lt;BR /&gt;Anyway, I also remember a question on HP certification which said words akin "to which one of these permissions is unsuitable"&lt;BR /&gt;a r--r--r--&lt;BR /&gt;b rw-rw-r--&lt;BR /&gt;c r--rw-rw-&lt;BR /&gt;&lt;BR /&gt;The answer is c because the group &amp;amp; world perms are greater than the owner perms.  Hence my heckles were raised as perms of 570.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Tim&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Aug 2003 11:49:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046086#M135398</guid>
      <dc:creator>Tim D Fulford</dc:creator>
      <dc:date>2003-08-11T11:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046087#M135399</link>
      <description>Hein,&lt;BR /&gt;&lt;BR /&gt;how can you mv .profile to /tmp if you dont own the directory you are in ? you get an error; mv: .profile: cannot unlink, Not owner&lt;BR /&gt;&lt;BR /&gt;I have spotted a problem, of course the homedir permissions must be 1570, not 570, in addition to owned by root. The sticky bit needs to be set to ensure only the owner can rm/mv files in it.&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Aug 2003 12:08:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046087#M135399</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2003-08-11T12:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046088#M135400</link>
      <description>Stefan, you're right that you can't mv if you set the sticky bit, but you can with the 570 permissions.&lt;BR /&gt;&lt;BR /&gt;To me, the solution with the sticky bit is bulletproof.  I could be wrong, but is it possible in some linux'es they create a 'presonal secondary group' per user in order to provide the functionalities we're dicussing here ?</description>
      <pubDate>Mon, 11 Aug 2003 12:20:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046088#M135400</guid>
      <dc:creator>hein coulier</dc:creator>
      <dc:date>2003-08-11T12:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046089#M135401</link>
      <description>Hi Clemens,&lt;BR /&gt;&lt;BR /&gt;of course you can prevent that a user deletes its own .profile but you can not prevent that he/she always use its own one. ie .profile must be readable for the user.&lt;BR /&gt;&lt;BR /&gt;-r--r--r--   1 root     sys        1158 Mar 17 16:35 .profile&lt;BR /&gt;&lt;BR /&gt;Ok I can't change it if .profile has this permissions. But I can do this&lt;BR /&gt; cat .profile &amp;gt; .my_profile&lt;BR /&gt;&lt;BR /&gt;No I have a .my_profile with my user permisssions and I can do changes in there.&lt;BR /&gt;&lt;BR /&gt;and I can always do this&lt;BR /&gt;$ . ./.my_profile&lt;BR /&gt;&lt;BR /&gt;The only thing that I need for that a directory where I'm allowed to write.&lt;BR /&gt;So, if ask your question because some users should not change there environment then you should ask:&lt;BR /&gt;&lt;BR /&gt;CAN I MADE ENVIRONMENT VARIABLES READ ONLY??&lt;BR /&gt;&lt;BR /&gt;I have no idea!!&lt;BR /&gt;&lt;BR /&gt;Roland</description>
      <pubDate>Mon, 11 Aug 2003 12:38:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046089#M135401</guid>
      <dc:creator>RolandH</dc:creator>
      <dc:date>2003-08-11T12:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046090#M135402</link>
      <description>There is always the workaround of having a cron job that checks all the users to see if they have a .profile and if they dont, copy in a default one.&lt;BR /&gt;&lt;BR /&gt;I had to do a similar thing on my system when I couldnt change the user behavior :-)&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Aug 2003 12:56:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046090#M135402</guid>
      <dc:creator>Kent Ostby</dc:creator>
      <dc:date>2003-08-11T12:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046091#M135403</link>
      <description>@,&lt;BR /&gt;&lt;BR /&gt;Thanks all for the replies !&lt;BR /&gt;Everybody is suggesting more or less a similar workaround, since there is no default solution.&lt;BR /&gt;&lt;BR /&gt;I think I use the workaround from which Kent also suggested.&lt;BR /&gt;&lt;BR /&gt;Thanks ALL,&lt;BR /&gt;Clemens</description>
      <pubDate>Mon, 11 Aug 2003 13:02:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046091#M135403</guid>
      <dc:creator>Clemens van Everdingen</dc:creator>
      <dc:date>2003-08-11T13:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046092#M135404</link>
      <description>Clemens,&lt;BR /&gt;&lt;BR /&gt;include a check if the user did change his login shell as well.&lt;BR /&gt;You might have a correct .profile all in place, but if the user had been able to "chsh /usr/bin/csh" he would be bound to .login and .cshrc instead of .profile&lt;BR /&gt;&lt;BR /&gt;From "man chsh" &lt;A href="http://reinolinux.fe.up.pt/cgi-bin/man2html?chsh+1" target="_blank"&gt;http://reinolinux.fe.up.pt/cgi-bin/man2html?chsh+1&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;"... A normal user may only change the login shell for their own account, ...."&lt;BR /&gt;&lt;BR /&gt;Which might certainly not what you want him to do ?&lt;BR /&gt;&lt;BR /&gt;Several doors to close I guess.&lt;BR /&gt;&lt;BR /&gt;Volker&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Aug 2003 16:56:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046092#M135404</guid>
      <dc:creator>Volker Borowski</dc:creator>
      <dc:date>2003-08-11T16:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046093#M135405</link>
      <description>Clemens,&lt;BR /&gt;&lt;BR /&gt;This may be a little late, but in the same vein as Kent's reply. Why not put the .profile check in /etc/profile, that way when a user logs in and they're profile is missing a default .profile is copied over. See attached.&lt;BR /&gt;&lt;BR /&gt;I also added some logging so you can see who keeps getting their .profile deleted. &lt;BR /&gt;&lt;BR /&gt;With further tweaking you could do a lookup of the user and copy any custom profile depending on that user's environment needs. I.E.  /etc/uskel vs /etc/skel as I used in the example.&lt;BR /&gt;&lt;BR /&gt;later,&lt;BR /&gt;&lt;BR /&gt;bob&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Aug 2003 17:05:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046093#M135405</guid>
      <dc:creator>Robert Salter</dc:creator>
      <dc:date>2003-08-11T17:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid users to remove the .profile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046094#M135406</link>
      <description>When I was an SA on a Sun server, we had a single standard .profile that we wanted everyone to use.  We created a link from all home directories to the one master .profile.&lt;BR /&gt;&lt;BR /&gt;Then, once a day, a scheduled job went to each home directory and if the link was missing, it was re-created.  If the user put his own .profile in there, it was removed first.&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Aug 2003 11:36:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/avoid-users-to-remove-the-profile/m-p/3046094#M135406</guid>
      <dc:creator>Fred Martin_1</dc:creator>
      <dc:date>2003-08-12T11:36:16Z</dc:date>
    </item>
  </channel>
</rss>

