5 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I wish to pull out a list of all user ids on the system, including the privileged ids, the groups to which they belong to. Sometimes after deleting an id also, its home dir does not get deleted or an entry is left behind in /etc/passwd.
Can someone help me with a script to achieve both. (2 Replies)
Discussion started by: ggayathri
2 Replies
2. Shell Programming and Scripting
Hello,
I have two files
File 1 with 10 columns
rsid position ........
xx 1:10000
File 2
position
1:10000
2:2000
....
I need to extract the IDs given in file 2(column1) from file 1 (column2) and print all columns from file1. I am trying this command (1 Reply)
Discussion started by: nans
1 Replies
3. Shell Programming and Scripting
I need a script that will move files and change the ownership from a user's old home directory to a new home directory on multiple NIS+ servers. (0 Replies)
Discussion started by: mackdaddy07
0 Replies
4. UNIX for Dummies Questions & Answers
hello friends,
i had this problem couldn't figure out. Every time i tried to su to an id by this command. it gave all killed command after that. Can't use it at all. ( OS Irix ). Any help greatly appreciated.
=========
server 23# su - hbl3121
Killed
Killed
Killed
Killed
Killed
Killed... (2 Replies)
Discussion started by: anphdula
2 Replies
5. UNIX for Dummies Questions & Answers
What's the relationship beteew IDS and informix ? (1 Reply)
Discussion started by: wuhuatao
1 Replies
LEARN ABOUT OPENSOLARIS
setreuid
setreuid(2) System Calls setreuid(2)
NAME
setreuid - set real and effective user IDs
SYNOPSIS
#include <unistd.h>
int setreuid(uid_t ruid, uid_t euid);
DESCRIPTION
The setreuid() function is used to set the real and effective user IDs of the calling process. If ruid is -1, the real user ID is not
changed; if euid is -1, the effective user ID is not changed. The real and effective user IDs may be set to different values in the same
call.
If the {PRIV_PROC_SETID} privilege is asserted in the effective set of the calling process, the real user ID and the effective user ID can
be set to any legal value.
If the {PRIV_PROC_SETID} privilege is not asserted in the effective set of the calling process, either the real user ID can be set to the
effective user ID, or the effective user ID can either be set to the saved set-user ID from execve() (seeexec(2)) or the real user ID.
In either case, if the real user ID is being changed (that is, if ruid is not -1), or the effective user ID is being changed to a value
not equal to the real user ID, the saved set-user ID is set equal to the new effective user ID.
All privileges are required to change to uid 0.
RETURN VALUES
Upon successful completion, 0 is returned. Otherwise, -1 is returned, errno is set to indicate the error, and neither of the user IDs will
be changed.
ERRORS
The setreuid() function will fail if:
EINVAL The value of ruid or euid is less than 0 or greater than UID_MAX (defined in <limits.h>).
EPERM The {PRIV_PROC_SETID} privilege is not asserted in the effective set of the calling processes and a change was specified other
than changing the real user ID to the effective user ID, or changing the effective user ID to the real user ID or the saved set-
user ID. See privileges(5) for additional restrictions which apply when changing to UID 0.
USAGE
If a set-user-ID process sets its effective user ID to its real user ID, it can still set its effective user ID back to the saved set-user
ID.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
exec(2), getuid(2), setregid(2), setuid(2), attributes(5), privileges(5), standards(5)
SunOS 5.11 22 Mar 2004 setreuid(2)