01-20-2011
Discover the last user in a group to edit a file?
Alright, so a number of users are in a group, and they have certain access rights to a file, which is owned by a single user, standard stuff, right?
However, I need to know which user in that group was the last user to edit a file.
Is there any way to determine this in SunOS 5.9? I've looked high and low and have been absolutely stuck.
10 More Discussions You Might Find Interesting
1. UNIX and Linux Applications
Hello
I'm writing a program for managing accounts and groups in a linux system.
My problem is how to update the members of a group in the /etc/group file,if i have to add/remove those members.
total 3 variables for adding some new members to the group :
char **oldmembers=grp->gr_mem; ... (1 Reply)
Discussion started by: mekos
1 Replies
2. UNIX for Dummies Questions & Answers
From what I have read it possible to create a new group by editing the etc/group and etc/passwd in UNIX two files but a non-experienced user may face many problems such as destroying the file by mistake ot that his changes to these file does not make any difference.
However, there is this... (2 Replies)
Discussion started by: whatev3r
2 Replies
3. Shell Programming and Scripting
I need to find all the files that have group Read or Write permission or files that have user write permission.
This is what I have so far:
find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}'
It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies
4. Solaris
Hi Experts
/etc/vfstab is corrupted as while editing it i forgot to comment some of the line.
how can i edit the file in single in user mod?
also, i have some problem in CD drive , so i cant boot it from CD and do the changes.
i tried mounding the root file system as rw, however no... (10 Replies)
Discussion started by: kumarmani
10 Replies
5. Cybersecurity
Under oracle user file abc.txt was created. Oracle user belong to dba group on UNIX Server. However other non Oracle users which belongs to some other network groups need read only access to this file.
Every time when I login as other then oracle user and try to view this file it saying that I... (2 Replies)
Discussion started by: groosha
2 Replies
6. Ubuntu
Hi,
Anyone can help me on how to duplicate privileges and group for useroradb01 to userrootdb01. I have currently using "useroradb01" and create a newly user "userrootdb01".
I want both in the sames privileges and group. Please see the existing users list below;
drwxr-xr-x 53 useroradb01... (0 Replies)
Discussion started by: fspalero
0 Replies
7. Shell Programming and Scripting
/etc/group
tiadm::345:mk789,po312,jo343,ju454,ko453,yx879,iy345,hn453
bin::2:root,daemon
sys::3:root,bin,adm
adm::4:root,daemon
uucp::5:root
/etc/passwd
mk789:x:234:1::/export/home/dummy:/bin/sh
po312:x:234:1::/export/home/dummy:/bin/sh
ju454:x:234:1::/export/home/dummy:/bin/sh... (6 Replies)
Discussion started by: chidori
6 Replies
8. UNIX for Advanced & Expert Users
i did a mistake. :(
user1 ]$ vi ~/.bashrc
sudo su - user2
now , whenever I try to login to user1 , it will login to user2.
How can I resolve this ? :rolleyes:
N.B
-- I do not have root access.
-- I dont know password of user2
-- this is a virtual machine. (1 Reply)
Discussion started by: linuxadmin
1 Replies
9. Red Hat
Hi,
In the following output you can see the the user "richard" is a member on the team/group "developers":
# id richard
uid=10247(richard) gid=100361(developers) groups=100361(developers),10053(testers)
but in the following details of the said group (developers), the said user... (3 Replies)
Discussion started by: indiansoil
3 Replies
10. UNIX for Dummies Questions & Answers
OK guys and gals.
I've been working on a debian system for a little bit, in hopes of making it into a system we can use for manifests and other things.
I am very new to unix, particularly debian.
I would like to make 2 or 3 different groups.
1 would be for me, and other people... (1 Reply)
Discussion started by: samee71
1 Replies
LEARN ABOUT HPUX
getpriority
getpriority(2) System Calls Manual getpriority(2)
NAME
getpriority, setpriority - get or set process priority
SYNOPSIS
DESCRIPTION
returns the priority of the indicated processes.
sets the priority of the indicated processes to priority.
The processes are indicated by which and who, where which can have one of the following values:
Get or set the priority of the specified process where
who is the process ID. A who of implies the process ID of the calling process.
Get or set the priority of the specified process group where
who is the process-group ID, indicating all processes belonging to that process-group. A who of implies the
process-group ID of the calling process.
Get or set the priority of the specified user where
who is the user ID, indicating all processes owned by that user. A who of implies the user ID of the calling
process.
If more than one process is indicated, the value returned by is the lowest valued priority of all the indicated processes, and sets the
priority of all indicated processes.
priority is a value from to where lower values indicate better priorities. The default priority for a process is 0.
If the calling process contains more than one thread or lightweight process (i.e., the process is multi-threaded) these functions shall
apply to all threads or lightweight processes in the calling process. The priority specified (or retrieved) is the same for all threads or
lightweight processes in a process. Negative priorities require appropriate privileges.
Security Restrictions
These system calls are subject to compartmental restrictions which restrict their access to processes in other compartments. This restric-
tion covers for querying the priority of processes in other compartments, and for changing the priority of processes in other compartments.
See compartments(5) for more information about compartmentalization on systems that support that feature.
Compartmental restrictions can be overridden if the process has the privilege (PRIV_COMMALLOWED). Processes owned by the superuser may not
have this privilege. Processes owned by any user may have this privilege, depending on system configuration.
requires the privilege (PRIV_OWNER) to change the priority of a process whose uid does not match the caller's real or effective uid.. Pro-
cesses owned by the superuser have this privilege. Processes owned by other users may have this privilege, depending on system configura-
tion.
requires the privilege (PRIV_LIMIT). Processes owned by the superuser have this privilege. Processes owned by other users may have this
privilege, depending on system configuration.
RETURN VALUE
returns the following values:
Successful completion.
n is an integer priority in the range to
Failure.
is set to indicate the error. See WARNINGS below.
returns the following values:
Successful completion.
Failure.
is set to indicate the error.
ERRORS
If or fails, is set to one of the following values:
[EACCES] The calling process does not have access rights to change one or more of the indicated processes. All processes for
which access is allowed are still affected.
[EINVAL] which is not one of the choices listed above, or who is out of range.
[EPERM] The calling process attempted to change the priority of a process to a smaller priority value without having appro-
priate privileges.
[ESRCH] Processes indicated by which and who cannot be found.
WARNINGS
can return both when it successfully finds a priority of and when it fails. To determine whether a failure occurred, set to before calling
then examine after the call returns.
AUTHOR
and were developed by the University of California, Berkeley.
SEE ALSO
nice(1), renice(1M), nice(2).
getpriority(2)