Sponsored Content
Operating Systems AIX sudo - User privilege specification Post 302587088 by admin_xor on Wednesday 4th of January 2012 05:07:14 AM
Old 01-04-2012
Well I can give you an example how I setup command alias in /etc/sudoers file for our ID Administration team. This is what it looks like:

Code:
Cmnd_Alias      IDADMIN=/usr/bin/mkuser, /usr/bin/chuser, /usr/sbin/rmuser, \
                /usr/bin/passwd [0-9]*, /usr/bin/passwd [A-z]* ,\
                !/usr/bin/passwd root, \
                /usr/bin/chsec, /usr/bin/mkgroup, /usr/sbin/rmgroup, \
                /home/comadm/passwd_lastupdate.pl, \
                /usr/bin/ls, /usr/bin/chmod, /usr/bin/chown, /usr/bin/chgrp, \
                /usr/bin/find, /usr/sbin/lsuser, /usr/bin/vi /etc/ftpusers, \
                /usr/local/bin/generate_user_file_list, \
                /usr/local/bin/remove_user_files, /usr/bin/cat, \
                /usr/bin/rm -f /var/spool/mail/*, \
                ! /usr/bin/rm -f /var/spool/mail/root, \
                /usr/bin/rm -f /var/spool/cron/crontabs/*, \
                ! /usr/bin/rm -f /var/spool/cron/crontabs/root, \
                /usr/bin/rm -f /var/spool/cron/atjobs/*, \
                /usr/bin/rm -rf /home/*, /usr/bin/pwdadm, /usr/bin/smitty user

With command alias you can not only create positive set of list but also you can specify what they cannot do using sudo (as opposed to what zaxxon said, note the exclamatory sign in front of commands which are being restricted).

Hope you get an idea on how to set up /etc/sudoers
This User Gave Thanks to admin_xor For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Write privilege for user

Is it possible to grant write privileges to a user on a directory with out having to add the user to a group or make the user the owner of the directory? My background is in Windows and in Windows you can grant specific privileges to a user without having to put the user in a group or making the... (3 Replies)
Discussion started by: here2learn
3 Replies

2. AIX

[Help] Give privilege to an ordinary user

I'm trying to give a non-root user the right to start IBM HTTP Server, the web server is listening on port 80, but for AIX, ports under 1024 are privilege ports which can be used only by root. /usr/IBMIHS/bin# ./apachectl start (13)Permission denied: make_sock: could not bind to address :::80... (1 Reply)
Discussion started by: ibmer414
1 Replies

3. Solaris

Root privilege for user

Can anyone please tell how to give root privilege to a normal user in solaris 10? (5 Replies)
Discussion started by: nicktrix
5 Replies

4. UNIX for Dummies Questions & Answers

How to create/restrict a user with to have no privilege from other group

Hello experts I am new to Unix. Env : HPUX I need to create a user say testuser such that it does not have access to file/directories from the other group i.e the last 3 digits . How do I do that. Reason for such a request :- I have an existing user oracle which has default umask... (3 Replies)
Discussion started by: simonsimon
3 Replies

5. AIX

User Privilege

How to assign superuser privilege to an ordinary user temporarily (1 Reply)
Discussion started by: udtyuvaraj
1 Replies

6. Red Hat

Save sudo privilege for session

I have setup public key based login to my CentOS VPS. I wish to disable direct root login and have created an admin user under wheel group and have modified /etc/sudoers file and gave Wheel group all privileges. But now I am being prompted for password whenever I type sudo. I do not wish to... (4 Replies)
Discussion started by: JoyceBabu
4 Replies

7. Cybersecurity

sudo - AIX - User privilege specification

I am planning to implement sudo for users. Under , it looks I have to put the users who need to have sudo access: What are the recommended for users? I don't think I need to give the ALL privilege (i.e ) to AIX users. I'd like to know the commonly used privilege specification for sudo... (1 Reply)
Discussion started by: Daniel Gate
1 Replies

8. Shell Programming and Scripting

Create user with different privilege

Hi , I want to create 3 different user with below privilege in Solaris and Linux. 1) Read Only 2)Read and Write Only 3) Admin user Can you guys help me on this . (3 Replies)
Discussion started by: Naveen Pathak
3 Replies

9. Solaris

Assigning proc_owner privilege to particular user in RBAC

Hi I need to assign proc_owner privilege to particular user through RBAC. How can I assign this privilege to user, I need help on this. Further I need to understand if I give this proc_owner privilege to particular user, what kind of control user will get on other user or system processes... (7 Replies)
Discussion started by: sb200
7 Replies
audswitch(2)							System Calls Manual						      audswitch(2)

NAME
audswitch() - suspend or resume auditing on the current process SYNOPSIS
DESCRIPTION
suspends or resumes auditing within the current process. This call is restricted to users with the privilege. One of the following flags must be used for aflag: Suspend auditing on the current process. Resume auditing on the current process. can be used in processes with the privilege to temporarily suspend auditing during intervals where auditing is to be handled by the process itself. Auditing is suspended by a call to with the parameter and resumed later by a call to with the parameter. An call to resume auditing serves only to reverse the action of a previous call to suspend auditing. A call to to resume auditing when auditing is not suspended has no effect. affects only the current process. For example, cannot suspend auditing for processes from the current process. (Use (see setaudproc(2)) to enable or disable auditing for a process and its children). Security Restrictions Some or all of the actions associated with this system call require the privilege. Processes owned by the superuser have this privilege. Processes owned by other users may have this privilege, depending on system configuration. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUE
Upon successful completion, returns If an error occurs, is returned and the global variable is set to indicate the error. ERRORS
fails if one of the following is true: The user does not possess the privilege. The input parameter is neither nor AUTHOR
was developed by HP. SEE ALSO
audevent(1M), audusr(1M), setaudproc(2), audit(5), privileges(5). audswitch(2)
All times are GMT -4. The time now is 03:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy