<?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: Transfer files using sudo in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209709#M325964</link>
    <description>The problem is that administration wants to get rid of *generic* users (root, oracle, etc.). Let's say we have two DBAs: John and Mary. These two people should NOT share the password for "oracle"; but instead have their own users (say "johnthedba" and "marythedba"). They will login to the system using their own *specific* users. When they need to do their DBA duties for the Oracle databases on the system, they will switch to "oracle" user using "sudo -i".</description>
    <pubDate>Wed, 04 Jun 2008 05:02:55 GMT</pubDate>
    <dc:creator>Fedon Kadifeli</dc:creator>
    <dc:date>2008-06-04T05:02:55Z</dc:date>
    <item>
      <title>Transfer files using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209697#M325952</link>
      <description>We are trying to eliminate the use of passwords for *generic* users like root, oracle etc. To do this we plan to use sudo and give permission to *specific* users to switch to root, oracle etc. using "sudo -i" for example.&lt;BR /&gt;&lt;BR /&gt;This solves the problem of logging in as a generic user to the system. However, from time to time there will be a need to transfer files (using scp, sftp or whatever) to or from a system using a *generic* user. For example assume you want to transfer a very large file to your PC which can only be accessed by the root user.&lt;BR /&gt;&lt;BR /&gt;How do you satisfy that kind of needs in real life?</description>
      <pubDate>Tue, 03 Jun 2008 12:22:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209697#M325952</guid>
      <dc:creator>Fedon Kadifeli</dc:creator>
      <dc:date>2008-06-03T12:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209698#M325953</link>
      <description>&amp;gt; How do you satisfy that kind of needs in&lt;BR /&gt;&amp;gt; real life?&lt;BR /&gt;&lt;BR /&gt;Fix the contradiction in the requirements?&lt;BR /&gt;Correct me if I'm wrong, but you seem to want&lt;BR /&gt;a non-root user to be able to access a file&lt;BR /&gt;"which can only be accessed by the root&lt;BR /&gt;user."</description>
      <pubDate>Tue, 03 Jun 2008 12:28:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209698#M325953</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-06-03T12:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209699#M325954</link>
      <description>Yes.&lt;BR /&gt;&lt;BR /&gt;Let me be more clear.&lt;BR /&gt;&lt;BR /&gt;User "user1" is a system admin and can use "sudo -i" to get root shell (so he/she can do anything a root can do without knowing the actual root password). How can "user1" transfer a file which can only be accessed by root? The option of chmod/chown or cp the file to give it "user1" ownership is not acceptable, considering it is a very large file that needs to be kept secure.</description>
      <pubDate>Tue, 03 Jun 2008 12:33:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209699#M325954</guid>
      <dc:creator>Fedon Kadifeli</dc:creator>
      <dc:date>2008-06-03T12:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209700#M325955</link>
      <description>Your best bet is to set up ssh keys, then you can transfer files as root (or oracle, etc.).&lt;BR /&gt;&lt;BR /&gt;Note: In this example I'll use oracle (note: this is very high level);&lt;BR /&gt;1) create key on source system (ssh-keygen) as oracle (this will be in ~oracle/.ssh)&lt;BR /&gt;2) copy public key to destination system and put in oracle's ~oracle/.ssh/authorized_keys file.&lt;BR /&gt;&lt;BR /&gt;Now you can scp files from source-&amp;gt;destination as oracle without needing the password.&lt;BR /&gt;&lt;BR /&gt;Note: when creating the key it will give the option of creating a pass phrase. I would recommend doing this. If you need to automate your process you can use an ssh key agent to help with the pass phrase.&lt;BR /&gt;&lt;BR /&gt;David</description>
      <pubDate>Tue, 03 Jun 2008 13:00:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209700#M325955</guid>
      <dc:creator>David Child_1</dc:creator>
      <dc:date>2008-06-03T13:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209701#M325956</link>
      <description>"ssh keys" was an option that we are considering. Any other more flexible options from "real life"?</description>
      <pubDate>Tue, 03 Jun 2008 13:02:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209701#M325956</guid>
      <dc:creator>Fedon Kadifeli</dc:creator>
      <dc:date>2008-06-03T13:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209702#M325957</link>
      <description>SSH is pretty flexible (and real).&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] considering it is a very large file&lt;BR /&gt;&amp;gt; that needs to be kept secure.&lt;BR /&gt;&lt;BR /&gt;It's easier to consider requirements like&lt;BR /&gt;this when they're known.  Perhaps you should&lt;BR /&gt;make a list.  SSH access as "root" may allow&lt;BR /&gt;a non-root user to do more than copy files,&lt;BR /&gt;too.</description>
      <pubDate>Tue, 03 Jun 2008 14:14:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209702#M325957</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-06-03T14:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209703#M325958</link>
      <description>&amp;gt; Let me be more clear.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] How can "user1" transfer a file which&lt;BR /&gt;&amp;gt; can only be accessed by root?&lt;BR /&gt;&lt;BR /&gt;That's clear.  It's impossible.  Either&lt;BR /&gt;"user1" _can_ access the file, or else only&lt;BR /&gt;"root" can can access the file.  They can't&lt;BR /&gt;both be true.  There are various methods by&lt;BR /&gt;which "user1" might access a well-protected&lt;BR /&gt;file, but there's no way to access a file&lt;BR /&gt;which can't be accessed.&lt;BR /&gt;&lt;BR /&gt;If you wish to give "user1" read access to a&lt;BR /&gt;file, this could be done using an access&lt;BR /&gt;control list. "man 5 acl".</description>
      <pubDate>Tue, 03 Jun 2008 14:25:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209703#M325958</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-06-03T14:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209704#M325959</link>
      <description>Let me be more specific about my needs. I (as a system admin) want to give the *specific* user "johnthedba" full "oracle" user priviledges without giving the password of "oracle". Actually nobody in the universe (including me) will know the password of "oracle" user.&lt;BR /&gt;&lt;BR /&gt;The user "johnthedba" will do anything "oracle" can do including copying files in and out of the system. The "ssh keys" (mentioned above) is an option; however it is very slow while copying file over a Gbps LAN environment. The user "johnthedba" will copy large oracle export files to or from other systems. These files are owned by "oracle" and nobody else will have read or write access to these files, including the directory they are stored. Currently we are using ftp because it is much faster than scp or sftp.&lt;BR /&gt;&lt;BR /&gt;I am considering using an ssh and netcat (nc) combination. Any other ideas?</description>
      <pubDate>Tue, 03 Jun 2008 14:44:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209704#M325959</guid>
      <dc:creator>Fedon Kadifeli</dc:creator>
      <dc:date>2008-06-03T14:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209705#M325960</link>
      <description>You can either sudo the user as oracle, or set all the oracle files as 770 with this user having the same group as oracle.&lt;BR /&gt;&lt;BR /&gt;As for file transfer, you can use a specific command line in sudo as oracle for this user.</description>
      <pubDate>Tue, 03 Jun 2008 16:21:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209705#M325960</guid>
      <dc:creator>Tingli</dc:creator>
      <dc:date>2008-06-03T16:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209706#M325961</link>
      <description>Something like this can work with appropriate sudo configuration and a decent ssh client:&lt;BR /&gt;&lt;BR /&gt;ssh youruser@yourserver "sudo cat /something/secure" &amp;gt;local_copy&lt;BR /&gt;&lt;BR /&gt;As for keys... they're a good solution in some situations, but letting users have ssh keys for generic accounts is almost the same as giving out the password. In both cases there is "something" that will give anybody who has it the ability to act as that user. Correctly controlling access while using ssh keys in this manner will probably be difficult.</description>
      <pubDate>Tue, 03 Jun 2008 16:27:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209706#M325961</guid>
      <dc:creator>Heironimus</dc:creator>
      <dc:date>2008-06-03T16:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209707#M325962</link>
      <description>This method is a little more complicated, but since your user can sudo into root (or oracle or any other application service account for that matter), he/she first can login to the interactive shell via ssh (or god forbid telnet) and modify the file permissions temporarily to allow his/her own user id to be able to read these files to be copied to the local workstation, then using the favorite scp client, files can be pulled to the workstation and upon completion of copy coperation, the file permission could be reset to what they were, prior to this activity.&lt;BR /&gt;&lt;BR /&gt;I know it is not convenient, but the price of security is inconvenience. You have to pay the piper at one point. So, pick your poison... :)</description>
      <pubDate>Tue, 03 Jun 2008 16:29:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209707#M325962</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2008-06-03T16:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209708#M325963</link>
      <description>&amp;gt; [...] I (as a system admin) want to give&lt;BR /&gt;&amp;gt; the *specific* user "johnthedba" full&lt;BR /&gt;&amp;gt; "oracle" user priviledges without giving&lt;BR /&gt;&amp;gt; the password of "oracle".  [...]&lt;BR /&gt;&lt;BR /&gt;If a user has 'full "oracle" user&lt;BR /&gt;privile[d]ges', why not give him the "oracle"&lt;BR /&gt;account password, too?  How much more damage&lt;BR /&gt;could he cause that way?&lt;BR /&gt;&lt;BR /&gt;Methods like ACLs and "sudo" are used to give&lt;BR /&gt;and _restrict_ special privileges.  If you&lt;BR /&gt;really want to give away the whole store, why&lt;BR /&gt;not hand over the keys and the deed?&lt;BR /&gt;&lt;BR /&gt;On the other hand, if you want to allow some&lt;BR /&gt;user(s) to be able to perform certain limited&lt;BR /&gt;tasks which require special privileges, then&lt;BR /&gt;selecting the best approach might require&lt;BR /&gt;defining exectly what those tasks are.</description>
      <pubDate>Tue, 03 Jun 2008 19:19:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209708#M325963</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-06-03T19:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209709#M325964</link>
      <description>The problem is that administration wants to get rid of *generic* users (root, oracle, etc.). Let's say we have two DBAs: John and Mary. These two people should NOT share the password for "oracle"; but instead have their own users (say "johnthedba" and "marythedba"). They will login to the system using their own *specific* users. When they need to do their DBA duties for the Oracle databases on the system, they will switch to "oracle" user using "sudo -i".</description>
      <pubDate>Wed, 04 Jun 2008 05:02:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209709#M325964</guid>
      <dc:creator>Fedon Kadifeli</dc:creator>
      <dc:date>2008-06-04T05:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files using sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209710#M325965</link>
      <description>Since user1 have admin access to these files via sudo, then all you need is ...&lt;BR /&gt;&lt;BR /&gt;oracle:&lt;BR /&gt;&lt;BR /&gt;sudo -u oracle scp user1@remotesystem:/path/file .&lt;BR /&gt;&lt;BR /&gt;When the file lands on the localhost, it will land as being owned by oracle.&lt;BR /&gt;&lt;BR /&gt;root:&lt;BR /&gt;&lt;BR /&gt;sudo scp user1@remotesystem:/path/file .&lt;BR /&gt;&lt;BR /&gt;When the file lands, it will be owned by root.&lt;BR /&gt;&lt;BR /&gt;Assumptions made here is that for the oracle example, that user1 has read access to these files you are trying to copy.  In our environment, all files are owned by oracle:dba and our dba admins are all in the dba group with at least 640 permissions.&lt;BR /&gt;&lt;BR /&gt;It is very possible for files that can only be accessed by root to be access by normal users with sudo (given that the normal user is given full sudo access).  Without running sudo, the same user1 will not have access to that file.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;-fng</description>
      <pubDate>Wed, 18 Mar 2009 20:04:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/transfer-files-using-sudo/m-p/4209710#M325965</guid>
      <dc:creator>Frank Ng</dc:creator>
      <dc:date>2009-03-18T20:04:05Z</dc:date>
    </item>
  </channel>
</rss>

