Hi, I'm new to linux and unix, and i have couple of problems:
1) how can i limit the access for a user, for example, i created a user, and i want that this user will be able to be only in one directory, and will see only the files i want him to.
2) I have a domain name, and i want that every... (4 Replies)
hey guys im rly new to unix. im attempting to list the 5 largest files in a directory.
so i got this far...
ls -lR | sort -r
and this lists all files by filesize, how can i limit this to only the 5 largest? (4 Replies)
I have tried limiting failed logins to three by the following method
logins -ox \ | awk -F: '($8 != "LK" && $1 != "root") { print $1 }' \ | while read logname; do
/usr/lbin/modprpw -m umaxlntr=3 "$logname"
done
/usr/lbin/modprdef -m umaxlntr=3
but it is failing on the 4th... any ideas?... (1 Reply)
if my user has to enter the name of months to carry out a search how can I limit the input values to only the month names and nothing else?
so far my input criteria for the user is this:
i would like it so the user can only enter the months in the way i have stated. otherwise they would... (11 Replies)
Hi,
I have searched the web and have come back with nothing that is satisfactory for what I require. SFTP is my corporations new file transfer standard. What I require is a method to lock down SFTP users to their directory (they may go to sub directories) while not restricting regular users. ... (2 Replies)
Hello,
Using a Solaris SunOS 5.10, is there anyway to limit the number of processors utilised by an external vendor application over the server, from the unix OS perspective? (1 Reply)
Hi there,
I have a Debian 5.0 server that my company uses for deployment testing. This server needs to be accessed by NOC people that have no NIX knowledge whatsoever.
I am creating a bash script for a menu-based command interface for the commands they need to run on their testing routines,... (21 Replies)
I'm looking for a way to limit connections to a Solaris 10 box from any single IP.
The problem is that I've had more experience doing this with IPTables on Linux, rather than with IPFilter, which I've found to be somewhat feature-poor.
I hope there is some way to do this using IPFilter, I've... (2 Replies)
Greetings.
I have script to monitor the disk space of folder it runs every 17 min with help of cron. It sends email when disk size reaches to 85 %. Now the issue is that it continousely generates email until we clear some space in that folder. Is it possible to restrict the Script to send only... (14 Replies)
Discussion started by: manju98458
14 Replies
LEARN ABOUT NETBSD
setregid
SETREGID(2) BSD System Calls Manual SETREGID(2)NAME
setregid -- set real and effective group ID's
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <unistd.h>
int
setregid(gid_t rgid, gid_t egid);
DESCRIPTION
This interface is made obsolete by the saved ID functionality in setgid(2) and setegid(2).
The real and effective group ID's of the current process are set according to the arguments. If the real group ID is changed, the saved
group ID is changed to the new value of the effective group ID.
If rgid or egid is -1, the current gid is filled in by the system. Unprivileged users may change the real group ID to the effective group
ID, and may change the effective group ID to the real group ID or the saved group ID; only the super-user may make other changes.
The setregid() function has been used to swap the real and effective group IDs in set-group-ID programs to temporarily relinquish the set-
group-ID value. This purpose is now better served by the use of the setegid() function (see setgid(2)).
When setting the real and effective group IDs to the same value, this function is equivalent to the setgid() function. When setting only the
effective group ID, this function is equivalent to the setegid() function.
RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error.
ERRORS
[EPERM] The current process is not the super-user and a change other than changing the effective group-id to the real group-id was
specified.
SEE ALSO getgid(2), setegid(2), setgid(2), setuid(2)HISTORY
The setregid() function call appeared in 4.2BSD. An incompatible version was implemented in 4.4BSD. It was reimplemented in NetBSD 1.2 in a
way compatible with 4.3BSD, SunOS and Linux, but should not be used in new code.
BSD January 5, 2001 BSD