GETUID(2) System Calls Manual GETUID(2)NAME
getuid, geteuid - get user identity
uid = getuid()
euid = geteuid()
Getuid returns the real user ID of the current process, geteuid the effective user ID.
The real user ID identifies the person who is logged in. The effective user ID gives the process additional permissions during execution
of "set-user-ID" mode processes, which use getuid to determine the real-user-id of the process that invoked them.
SEE ALSO getgid(2), setreuid(2)4th Berkeley Distribution January 7, 1986 GETUID(2)
Check Out this Related Man Page
GETUID(2) Linux Programmer's Manual GETUID(2)NAME
getuid, geteuid - get user identity
getuid() returns the real user ID of the calling process.
geteuid() returns the effective user ID of the calling process.
When a normal program is executed, the effective and real user ID of the process are set to the ID of the user executing the file. When a
set ID program is executed the real user ID is set to the calling user and the effective user ID corresponds to the set ID bit on the file
These functions are always successful.
In Unix V6 the getuid() call returned (euid << 8) + uid. Unix V7 introduced separate calls getuid() and geteuid().
SEE ALSO getresuid(2), setreuid(2), setuid(2), credentials(7)COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 1993-07-23 GETUID(2)
I need help on following two.
Say i am getting two values like this
::1:953 and :::8005
I need to replace "::" (first two colons with a * ).I can get these values in a variable.How to tweak this variable to separate out the way i want? Anything after third ":" should be set... (9 Replies)
I just started Unix, i am neither a student nor a proffessional.
i just completed my masters degree and looking for a career in Unix/Linux.
so i will be preparing for myself with the help of different forum's guru's.
i just completed the os basics and going through baiscs of... (3 Replies)
My system is Debian-503-amd64. After I installed the "lpr" package, I found that some files with SUID bit come from this package. As:
ls -l /usr/bin/lp*
-rwsr-sr-x 1 root lp 31800 2008-05-20 /usr/bin/lpq
-rwsr-sr-x 1 root lp 28504 2008-05-20 /usr/bin/lpr
-rwsr-sr-x 1... (1 Reply)
I am OpenBSD newbie and currently need to manage some OpenBSD firewalls running pf. The OpenBSD version is 4.8
As the other sys admins are not so familiar with OpenBSD, so I have an idea across in my mind on how to minimize the root account usage and other unnecessary access and make... (9 Replies)
Despite the exec man page, the exec system call seems to turn my effective-user-id into my real-user-id.
I coded and compiled 2 very simple c programs as user 1 (uid=501)
The first one (A) prints real and effective user IDs and then execs the second one (B), which in turn prints... (7 Replies)
I am facing strange problem in solaris 10.
My requirement is that on server A using user test, any user which is created on Server B will be able to login wihtout password (ssh) from Server A
All the users which are on Server B are able able to login from Server A using test user.
... (8 Replies)
Sendmail takes too long to start and the host is unable to send emails, below are the steps followed, Please let me know if I'm missing anything, is there a debug mode for mailx?
# time service sendmail restart
Shutting down sm-client:
Shutting... (6 Replies)
I created a new user "rootNew"
After creation I manually change the file /etc/passwd and gave the new user "rootNew" uid 0.
Now I have 2 users with uid 0 (root,rootNew) how can I know which user is log in the system?
"whoami" command return "root" for both users.
Uri (10 Replies)
In our project we have several unix scripts that trigger different processes. These scripts write logs to a particular folder 'sesslogs', create output data files in a separate directory called 'datafiles' etc. Usually L1 support team re-run these scripts . We donot want L1 support team to have... (14 Replies)
I have an XML file with the following requirement to move the <AdditionalAccountHolders> tag and its content right after the <accountHolderName> tag within the same file but I'm not sure how to accomplish this through a Unix script.
Any feedback will be greatly appreciated.
... (19 Replies)
Someone, please help on this issue:-
Note : for security reason i didn't mention hostnames and ips.
polling server every 1024 s
Ntpstat showing unsynchronised.
... (29 Replies)