Re: Oracle osuser in v$session

From: Vishnu Potukanuma <vishnupotukanuma_at_gmail.com>
Date: Thu, 16 Jan 2020 02:10:04 +0530
Message-ID: <CAP-RywzYoqk4G004RH1_TG8u+wcoG47iwDdb-Jxwfr0V0CBX5w_at_mail.gmail.com>



As Mark pointed out, the default configuration for web servers such as apache spawn the threads/processes for incoming requests as root user unless you explicitly specify the username and group name in the configuration file such as the following.  it is a very bad practice to run as root...

# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#

User WebPPS1
Group app

Thanks,
Vishnu

On Tue, Jan 14, 2020 at 4:39 PM Timur Akhmadeev <timur.akhmadeev_at_gmail.com> wrote:

> Prior to Java 9 there was no
> <https://stackoverflow.com/questions/35842/how-can-a-java-program-get-its-own-process-id>
> platform-independent way to get PID from inside of a Java program, so JDBC
> driver used 1234 as a default value (can be customized with
> -Dv\$session.process=something if you want to)
> Java 10 compliant JDBC driver doesn't use the new API so JDBC clients will
> continue to use 1234 as v$session.process for some time.
>
> On Tue, Jan 14, 2020 at 12:02 PM Priit Piipuu <priit.piipuu_at_gmail.com>
> wrote:
>
>>
>>
>> On Mon, 13 Jan 2020 at 22:11, Sanjay Mishra <dmarc-noreply_at_freelists.org>
>> wrote:
>>
>>>
>>> I am sharing the details from v$session
>>> CONNECTIONS USERNAME STATUS MODULE OSUSER
>>> ----------- --------------- -------- ---------------------------- -------
>>> 29 REMAC2 INACTIVE JDBC Thin Client ?
>>> 50 REMAC1 INACTIVE JDBC Thin Client ?
>>> 53 REMAC3 INACTIVE JDBC Thin Client root
>>> 95 REMAV INACTIVE JDBC Thin Client root
>>> Also strange Machine name is coming in the same v$ession view
>>>
>>
>> It takes a great courage to run Java apps as a root :) With Oracle JDBC
>> 12.1.0.2 JDBC driver and later, OSUSER and MACHINE are usually correct and
>> PROCESS isn't.
>> V$SESSION_CONNECT_INFO has extra details about who connects with which
>> driver.
>>
>>
>
>
> --
> Regards
> Timur Akhmadeev
>

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jan 15 2020 - 21:40:04 CET

Original text of this message