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 REDHAT
setregid
SETREUID(2) Linux Programmer's Manual SETREUID(2)
NAME
setreuid, setregid - set real and/or effective user or group ID
SYNOPSIS
#include <sys/types.h>
#include <unistd.h>
int setreuid(uid_t ruid, uid_t euid);
int setregid(gid_t rgid, gid_t egid);
DESCRIPTION
setreuid sets real and effective user IDs of the current process. Unprivileged users may only set the real user ID to the real user ID or
the effective user ID, and may only set the effective user ID to the real user ID, the effective user ID or the saved user ID.
Supplying a value of -1 for either the real or effective user ID forces the system to leave that ID unchanged.
If the real user ID is set or the effective user ID is set to a value not equal to the previous real user ID, the saved user ID will be set
to the new effective user ID.
Completely analogously, setregid sets real and effective group ID's of the current process, and all of the above holds with "group" instead
of "user".
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
ERRORS
EPERM The current process is not the super-user and changes other than (i) swapping the effective user (group) ID with the real user
(group) ID, or (ii) setting one to the value of the other or (iii) setting the effective user (group) ID to the value of the saved
user (group) ID was specified.
NOTES
Setting the effective user (group) ID to the saved user ID is possible since Linux 1.1.37 (1.1.38).
CONFORMING TO
BSD 4.3 (the setreuid and setregid function calls first appeared in 4.2BSD).
SEE ALSO
getuid(2), getgid(2), setuid(2), setgid(2), seteuid(2), setresuid(2)
Linux 1.1.38 1994-08-02 SETREUID(2)