Write a tool that will be displayed in real time, what user connects or disconnects from a system that uses this tool :))
Maybe anyone can help me? (2 Replies)
Hi
I'm trying to get the real username of any user running as root on my server. On one of my server running Sol 10, if I su to root and run who am i, it displays my username. which is what I want.
But when I run it on another server, this time on Sol 8, it displays root as the user. Is... (9 Replies)
so i'm using the following script to attempt to simulate a user visiting a page but unfortunately, it doesn't look like this is working:
wget -nv -r "http://www.mywebsite.com"
does anyone have a better idea of how to do this? the goal here is to run a wget command from a linux host to a... (3 Replies)
Below is my script to log all the command input by any user to /var/log/messages. But I cant achieve the desired output that i want. PLease see below.
function log2syslog
{
declare COMMAND
COMMAND=$(fc -ln -0)
logger -p local1.notice -t bash -i -- "$USER:$COMMAND"
}
trap... (12 Replies)
Hello All,
Was recently working on an requirement where we have to search files more than a specific number, following is the example on same.
Let's say file names are test_40000.txt,test_40001.txt and so on till test_99999.txt.
Now requirement was to search from find command only those... (1 Reply)
SETREUID(2) BSD System Calls Manual SETREUID(2)NAME
setreuid -- set real and effective user IDs
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <unistd.h>
int
setreuid(uid_t ruid, uid_t euid);
DESCRIPTION
The real and effective user IDs of the current process are set according to the arguments. If ruid or euid is -1, the current uid is filled
in by the system. Unprivileged users may change the real user ID to the effective user ID and vice-versa; only the super-user may make other
changes.
The setreuid() function has been used to swap the real and effective user IDs in set-user-ID programs to temporarily relinquish the set-user-
ID value. This purpose is now better served by the use of the seteuid() function (see setuid(2)).
When setting the real and effective user IDs to the same value, the standard setuid() function is preferred.
RETURN VALUES
The setreuid() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indi-
cate the error.
ERRORS
[EPERM] The current process is not the super-user and a change other than changing the effective user-id to the real user-id was
specified.
SEE ALSO getuid(2), issetugid(2), seteuid(2), setuid(2)HISTORY
The setreuid() system call appeared in 4.2BSD.
BSD February 8, 2001 BSD