Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Command run with admin privileges Post 302821199 by mastansaheb on Friday 14th of June 2013 07:39:35 AM
Old 06-14-2013
Hi Scott,

Thanks for your prompt reply. I know about how to run a command as normal user with administrator privileges using sudo. But my intention is run a single command which is having admin privileges as normal user. Is it possible ?
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Admin of Users from command line

I have been adding new users on a system(SOLARIS 8), and one of these 'nice'(?) users has got back to me to complain that his full name isnt showing up when he does the following at the command prompt : $ finger <login_id> You see when I added the users details at the command line using... (2 Replies)
Discussion started by: Kanu77
2 Replies

2. UNIX for Dummies Questions & Answers

linux command line admin tool

Dear All, I am new to linux administration. what is the tool that is used to admin the linux server from remote client using telnet session. It can be used on the server also but start from command line with out Xwindows. just like SMIT in AIX. With Regards, Varma. (1 Reply)
Discussion started by: jarkvarma
1 Replies

3. Solaris

Lp admin command

Folks - any advice on lp commands etc.. I dont use printers on solaris servers, neither do we have any installed but I need to know as much as possible for the solaris admin course... Any advice on good sources of information for printing commands in general? (1 Reply)
Discussion started by: frustrated1
1 Replies

4. Shell Programming and Scripting

Admin privileges check

I've been tasked to check whether the user of a script has administrative privileges (as they are needed to run certain parts of the script), and if not notify the user to run the script with admin privileges. Since the script is to be widely distributed, controlling the file rights will not be... (6 Replies)
Discussion started by: gliesian
6 Replies

5. Debian

Change the privileges needed to run a program

Hi everyone, I have an issue with a project of mine. I have to run a program on a terminal which requires to be logged in as su to have it run it. Given that I'm having problem to use expect to give the password I'd like to change the privilege of that program from SU to normal user ( I have the SU... (13 Replies)
Discussion started by: gaisselick87
13 Replies

6. Windows & DOS: Issues & Discussions

Lost Domain Admin Privileges in Samba

Hello, I have apparently lost all domain admin privledges in Samba. I have had several problems ever since I installed the 1/31 Solaris patch cluster. I had to roll out one Samba update (146363-01), which denied all logons network access. However, this particular problem seems to have begun... (0 Replies)
Discussion started by: stringman
0 Replies

7. Shell Programming and Scripting

Admin user command usage restrictions

Hi, I need to work on restricting the Linux commands to the ADMIN user to some extent. It means for example, Admin users should not use passwd command to change the password of "root" or other important accounts like oracle, etc., So, I want to know which commands should be restricted upto which... (5 Replies)
Discussion started by: Dpu
5 Replies

8. Shell Programming and Scripting

Script for telnet and run one command kill it and run another command using while loop

( sleep 3 echo ${LOGIN} sleep 2 echo ${PSWD} sleep 2 while read line do echo "$line" PID=$? sleep 2 kill -9 $PID done < temp sleep 5 echo "exit" ) | telnet ${HOST} while is executing only command and exits. (5 Replies)
Discussion started by: sooda
5 Replies

9. What is on Your Mind?

Regarding Admin life either as DBA or UNIX Linux admin

I am planning to choose my career as Unix/Linux Admin or a DBA. But I have come to know from forums and few admins like the job will be 24/7. I have few questions on that. Can we get "DAY" shifts in any one of the admin Job ? Can't we have shift timings in any company ? Eventhough the... (7 Replies)
Discussion started by: Jacktts
7 Replies
pfexec(1)							   User Commands							 pfexec(1)

NAME
pfexec, pfsh, pfcsh, pfksh - execute a command in a profile SYNOPSIS
/usr/bin/pfexec command /usr/bin/pfexec -P privspec command [ arg ]... /usr/bin/pfsh [ options ] [ argument ]... /usr/bin/pfcsh [ options ] [ argument ]... /usr/bin/pfksh [ options ] [ argument ]... DESCRIPTION
The pfexec program is used to execute commands with the attributes specified by the user's profiles in the exec_attr(4) database. It is invoked by the profile shells, pfsh, pfcsh, and pfksh which are linked to the Bourne shell, C shell, and Korn shell, respectively. Profiles are searched in the order specified in the user's entry in the user_attr(4) database. If the same command appears in more than one profile, the profile shell uses the first matching entry. The second form, pfexec -P privspec, allows a user to obtain the additional privileges awarded to the user's profiles in prof_attr(4). The privileges specification on the commands line is parsed using priv_str_to_set(3C). The resulting privileges are intersected with the union of the privileges specified using the "privs" keyword in prof_attr(4) for all the user's profiles and added to the inheritable set before executing the command. USAGE
pfexec is used to execute commands with predefined process attributes, such as specific user or group IDs. Refer to the sh(1), csh(1), and ksh(1) man pages for complete usage descriptions of the profile shells. EXAMPLES
Example 1 Obtaining additional user privileges example% pfexec -P all chown user file This command runs chown user file with all privileges assigned to the current user, not necessarily all privileges. EXIT STATUS
The following exit values are returned: 0 Successful completion. 1 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
csh(1), ksh(1), profiles(1), sh(1), exec_attr(4), prof_attr(4), user_attr(4), attributes(5) SunOS 5.11 3 Mar 2003 pfexec(1)
All times are GMT -4. The time now is 06:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy