Using your example UID and GID (multiplied by 100 just for my example): However we do hope that you are not actually changing the unix account with UID 1 because your system will probably stop working.
I have a truble with NFS mount.
When i mount remote dir, then all permissions changes!
For example:
# mkdir /data
# mount 10.1.1.100:/var/data /data
# ls -l /data
drwxr-xr-x 7 nobody nobody 5632 Oct 22 14:55 file1
drwxr-xr-x 4 nobody nobody 512 Oct 22 14:55... (4 Replies)
Dear Folks :-)
I want to rsync some files between some servers and preserve files owner and group (not UID or GID), in some machines UID and GID are differents, for example:
a) In the rsync server:
# stat vbseo.php
File: `vbseo.php'
Size: 26758 Blocks: 56 IO... (1 Reply)
Hi,
out of curosity this question just popped in my mind. Is there any way to find out the uid and gid of the running process ?
If i do a ls -l of a program then it shows the uid/gid bit (if its set). I want to see as which user/group the program is running ..... is there any way to know this... (2 Replies)
Hi,
can somebody tell me how to make directoriy in which all files will be generated as dir owner ?
I'm able to add GID for directory group and files have group id like folder , but when i do same for user files still are created as user which creates them :(
drwsrwsrwx 2 flexbul ... (2 Replies)
I´m listing the contents of a directory using the command
ls -lI get numeric uid and gid for some lines.
example:
drwxr-xr-x root root 1970-01-01 01:00 sys
-rw-r--r-- 501 20 0 2010-08-04 14:54 shutdown.bravo.rc
drwxr-x--- 501 20 ... (5 Replies)
Present
/home/dsadm# id dsadm
uid=0(root) gid=0(root)
----------------------------------
needs to be
/home/dsadm> id dsadm
uid=23186(dsadm) gid=16284(gdstage)
Please provide the command/steps for the above uid, gid value change
Thanks in advance for all your support .
... (3 Replies)
Hi Everyone,
We are encountering the following issue on AIX 5.3. When we do ls -ltr the list displays only user id and group id instead of user name and group name.
This is happening for all users except root. Whe we do ls -ltr with root user it shows perfectly fine.
When we searched... (25 Replies)
I would like to get an opinion for my solution for this task and get feedback about better approach or mistakes I have made.
1. The problem statement, all variables and given/known data:
The task is to create a script which prints information about users whose names are specified in the... (2 Replies)
OK, so simple question here:
Is there anyway to REMAP, while extracting with tar, specific uid's and gid's on extracted files ?
Background: The usual transfer between two servers with same literals username's names, but with different gid and uid. I would like, for example, files owned by... (6 Replies)
Discussion started by: fidodido
6 Replies
LEARN ABOUT SUSE
setresgid32
SETRESUID(2) Linux Programmer's Manual SETRESUID(2)NAME
setresuid, setresgid - set real, effective and saved user or group ID
SYNOPSIS
#define _GNU_SOURCE
#include <unistd.h>
int setresuid(uid_t ruid, uid_t euid, uid_t suid);
int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
DESCRIPTION
setresuid() sets the real user ID, the effective user ID, and the saved set-user-ID of the calling process.
Unprivileged user processes may change the real UID, effective UID, and saved set-user-ID, each to one of: the current real UID, the cur-
rent effective UID or the current saved set-user-ID.
Privileged processes (on Linux, those having the CAP_SETUID capability) may set the real UID, effective UID, and saved set-user-ID to arbi-
trary values.
If one of the arguments equals -1, the corresponding value is not changed.
Regardless of what changes are made to the real UID, effective UID, and saved set-user-ID, the file system UID is always set to the same
value as the (possibly new) effective UID.
Completely analogously, setresgid() sets the real GID, effective GID, and saved set-group-ID of the calling process (and always modifies
the file system GID to be the same as the effective GID), with the same restrictions for unprivileged processes.
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
ERRORS
EAGAIN uid does not match the current UID and this call would bring that user ID over its RLIMIT_NPROC resource limit.
EPERM The calling process is not privileged (did not have the CAP_SETUID capability) and tried to change the IDs to values that are not
permitted.
VERSIONS
These calls are available under Linux since Linux 2.1.44.
CONFORMING TO
These calls are nonstandard; they also appear on HP-UX and some of the BSDs.
NOTES
Under HP-UX and FreeBSD the prototype is found in <unistd.h>. Under Linux the prototype is provided by glibc since version 2.3.2.
SEE ALSO getresuid(2), getuid(2), setfsgid(2), setfsuid(2), setreuid(2), setuid(2), capabilities(7), credentials(7), feature_test_macros(7)COLOPHON
This page is part of release 3.25 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 2007-07-26 SETRESUID(2)