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) BSD System Calls Manual GETUID(2)NAME
getuid, geteuid -- get user identification
Standard C Library (libc, -lc)
The getuid() system call returns the real user ID of the calling process. The geteuid() system call returns the effective user ID of the
The real user ID is that of the user who has invoked the program. As the effective user ID gives the process additional permissions during
execution of ``set-user-ID'' mode processes, getuid() is used to determine the real-user-id of the calling process.
The getuid() and geteuid() system calls are always successful, and no return value is reserved to indicate an error.
SEE ALSO getgid(2), issetugid(2), setgid(2), setreuid(2), setuid(2)STANDARDS
The geteuid() and getuid() system calls are expected to conform to ISO/IEC 9945-1:1990 (``POSIX.1'').
The getuid() and geteuid() functions appeared in Version 7 AT&T UNIX.
BSD June 4, 1993 BSD
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)