Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

groupmember(9) [freebsd man page]

GROUPMEMBER(9)						   BSD Kernel Developer's Manual					    GROUPMEMBER(9)

NAME
groupmember -- checks group set for a group ID SYNOPSIS
#include <sys/param.h> #include <sys/ucred.h> int groupmember(gid_t gid, struct ucred *cred); DESCRIPTION
The groupmember() function checks to see if the given gid is in the group set of the credentials. Its arguments are: gid The group ID to check for. cred The credentials to search for the group in. RETURN VALUES
If the gid is found, 1 is returned; otherwise, 0 is returned. AUTHORS
This manual page was written by Chad David <davidc@acns.ab.ca>. BSD
July 9, 2001 BSD

Check Out this Related Man Page

VOP_ACCESS(9)						   BSD Kernel Developer's Manual					     VOP_ACCESS(9)

NAME
VOP_ACCESS, VOP_ACCESSX -- check access permissions of a file or Unix domain socket SYNOPSIS
#include <sys/param.h> #include <sys/vnode.h> int VOP_ACCESS(struct vnode *vp, accmode_t accmode, struct ucred *cred, struct thread *td); int VOP_ACCESSX(struct vnode *vp, accmode_t accmode, struct ucred *cred, struct thread *td); DESCRIPTION
This entry point checks the access permissions of the file against the given credentials. Its arguments are: vp The vnode of the file to check. accmode The type of access required. cred The user credentials to check. td The thread which is checking. The accmode is a mask which can contain flags described in <sys/vnode.h>, e.g. VREAD, VWRITE or VEXEC. For VOP_ACCESS(), the only flags that may be set in accmode are VEXEC, VWRITE, VREAD, VADMIN and VAPPEND. To check for other flags, one has to use VOP_ACCESSX() instead. LOCKS
The vnode will be locked on entry and should remain locked on return. RETURN VALUES
If the file is accessible in the specified way, then zero is returned, otherwise an appropriate error code is returned. ERRORS
[EPERM] An attempt was made to change an immutable file. [EACCES] The permission bits the file mode or the ACL do not permit the requested access. SEE ALSO
vaccess(9), vaccess_acl_nfs4(9), vaccess_acl_posix1e(9), vnode(9) AUTHORS
This manual page was written by Doug Rabson. BSD
September 18, 2009 BSD
Man Page

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

pdadmin script help needed

Hello all, I need to create a report for the list of users and related groups present in my ldap directory. I need a script which does the following and give out a final script as specified. Any help is appreciated. 1)pdadmin -a sec_master -p <passwd> group show-members <groupname> >>... (11 Replies)
Discussion started by: sophos
11 Replies

2. OS X (Apple)

Hidding The Administrator Account in OS X 10.5 (Leopard)

I would like to know how to hide my initial account (which is an administrator account) in the new Leopard 10.5 operating system. In the old OS 10.4 this could be done very easily with the help of NetInfo Manager. You could change the UID to anything below 500 and secure your account, however in... (11 Replies)
Discussion started by: unimachead
11 Replies

3. OS X (Apple)

bash script for dseditgroups in OSX

Hi there, Hope this isn't too complex of a script to try to make but this is what I'm trying to do. Create a new group and add local users that aren't admin to the group. So let's say the new group is 'cats' and 'dog' is the only admin on the machine. Let's say most machines only have one... (4 Replies)
Discussion started by: stop.the.stupid
4 Replies

4. Shell Programming and Scripting

Help with a shell script ?

Hello everyone, I just had to help at work with the new xserve and imacs we received. I've put a loginhook on the clients, running the following script : gp_member=`dscl /LDAPv3/islxsrv1.isl.local -search /Groups GroupMembership "$log_user" | grep students_primary | sed... (2 Replies)
Discussion started by: maille-hem
2 Replies

5. OS X (Apple)

Scripting User Account Removal

Ok, so I've been looking all over the place for how exactly to do this and I've become so bombarded with information I finally decided I'll pose the question here. I'm not a programmer or anything that hardcore, but if I see things already implemented and working examples I can easily learn and... (17 Replies)
Discussion started by: panacea
17 Replies

6. Shell Programming and Scripting

If first pattern is found, look for second pattern. If second pattern not found, delete line

I had a spot of trouble coming up with a title, hopefully you'll understand once you read my problem... :) I have the output of an ldapsearch that looks like this: dn: cn=sam,ou=company,o=com uidNumber: 7174 gidNumber: 49563 homeDirectory: /home/sam loginshell: /bin/bash uid: sam... (2 Replies)
Discussion started by: samgoober
2 Replies

7. Shell Programming and Scripting

Cron Job failure - No such file or directory

Hi all, I'm having an issue with a script i wrote to pull information from the Amazon AWS API. Basically the script takes arguments from the command line and attempts to grab user information for each AWS access group. The command is issued like this: # sh awsReport.sh <outputFileName>... (3 Replies)
Discussion started by: ChocoTaco
3 Replies