Sponsored Content
Full Discussion: Role not executing command
Operating Systems Solaris Role not executing command Post 302775259 by cjashu on Monday 4th of March 2013 12:07:53 PM
Old 03-04-2013
Role not executing command

Hello Guys,
I am studying RBAC. So I create a role called sysadm and gave it the "shutdown" profile.

Now when I switch to that role, and execute the shutdown command

Code:
$ shutdown -y -g0 -i5

The system responds with :

shutdown: not found


Can anyone help me with this please?

Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Executing a command at startup

Hey all, How do I execute a file at startup automatically. From what I've read is that I need to put it into my .bashrc file. I'm not sure where to go from there. Can I just type commands into that and they'll run next time I restart my server? Right now I have added these lines: cd... (2 Replies)
Discussion started by: NathanWarden
2 Replies

2. Shell Programming and Scripting

executing command from subdirectories

Hello, I've been trying to run 'ls -1R | wc -l' inside of sub directories to in order to determine how big each folder is. find . -maxdepth 1 -type d | while read folder do cd "$folder" && echo "$folder has $(ls -1R | wc -l) files" && cd .. done or for... (3 Replies)
Discussion started by: NoobProgrammer
3 Replies

3. UNIX for Dummies Questions & Answers

Doing a capture while another command is executing?

Basically what i'm trying to do is execute an update command and at the same time have the system do a TCPdump to file for that update traffic. So I would like to connect the two commands so that the tcpdump terminates automatically when the update finishes/fails/whatever. Right now I have... (0 Replies)
Discussion started by: MrEddy
0 Replies

4. Shell Programming and Scripting

Prepare command before executing

Hi, Couldnt find the right string" to search for a similar question..so dont know if this has been answered yet...problem is that I want to prepare a command with the requisite parameters passed as a string before executing it...eg: the ls command .. I can pass "-l", "-t" as parameters and... (12 Replies)
Discussion started by: harman_6
12 Replies

5. Shell Programming and Scripting

cd command not executing in if else loop

Hi, I am executing below script s1=`pwd` s2=/space if then echo "done" else echo "mistake" cd /tmp fi I am not able to migrate to /tmp directory if the condition is not true.However mistake is being printed.Means cd command is not working here.All other commands except cd are... (3 Replies)
Discussion started by: d8011
3 Replies

6. Shell Programming and Scripting

Which filesystem a command is executing from?

Hi. We can have one or more agents of a particular type running on our AIX and Solaris servers. As these agents have usually been installed into their own filesystems, I need to capture the filesystem names for auditing purposes. I've had a search through the forums can see something that fits the... (16 Replies)
Discussion started by: smoosmoo
16 Replies

7. Shell Programming and Scripting

Error while executing sh command

Hi, I have 2 files temp1.sh and temp2.sh as follows: =========== temp1.sh =========== echo "session1" sh temp2.sh echo "exit session2 and enter session1" ================================= ============= temp2.sh ============= echo "session2" sh echo "exit session2"... (5 Replies)
Discussion started by: RP09
5 Replies

8. Shell Programming and Scripting

Help executing command with options

Hi, I have this command in a shell script and I can get it to echo ok, but when I try to execute the command I get a "file not found" error. Which is strange because, if I copy and paste the same command at the cli it works ok. What am I doing wrong please? (16 Replies)
Discussion started by: bbbngowc
16 Replies

9. Red Hat

Warn Before Executing Particular Command

I'm running CentOS 6.8 and use bash. I would like a warning to appear to the user who runs the command "service httpd restart" E.g. # service httpd restart are you sure y/n n # (or if y, the command executes). I looked into it a little but am not sure of the best approach. Aliases I ... (1 Reply)
Discussion started by: spacegoose
1 Replies

10. Red Hat

Warn Before Executing Particular Command

I'm running CentOS 6.8 and use bash. I would like a warning to appear to the user who runs the command "service httpd restart" E.g. # service httpd restart are you sure y/n n # (or if y, the command executes). I looked into it a little but am not sure of the best approach. Aliases I... (2 Replies)
Discussion started by: spacegoose
2 Replies
rbacdbchk(1M)															     rbacdbchk(1M)

NAME
rbacdbchk - Verifies the syntax of the Role-Based Access Control (RBAC) database files SYNOPSIS
DESCRIPTION
verifies that there are no conflicting or inconsistent entries in and amongst the RBAC database files. also checks the syntax of the data- base files and prints messages indicating which lines contain errors. returns zero output if no errors are present in the database files. All the RBAC database files and are verified. See rbac(5) for more information on these RBAC database files. Options supports the following options: Checks the database. Checks the database. Checks the database. Checks the database. Checks the database. Cross reference checks all databases. EXTERNAL INFLUENCES
Environment Variables determines the language in which messages are displayed. International Code Set Support Single-byte character code set is supported. RETURN VALUE
0. Success 1. Incorrect syntax EXAMPLES
The following example finds an error that user is an invalid user # rbacdbchk [/etc/rbac/user_role] John: Administrator invalid user The value 'John' for the Username field is bad. The following example finds a syntax error, an extra colon at the end of a line: # rbacdbchk [/etc/rbac/user_role] root: Administrator: invalid name: Not alphanumeric The value 'Administrator:' for the Rolename field is bad. [Role in role_auth DB with no assigned user in user_role DB] Administrator:(hpux.*, *) The following example finds a field missing: # rbacdbchk [/etc/rbac/roles] : my comment invalid name: <empty> The value '' for the Rolename field is bad. The following example finds a bad role: # rbacdbchk [Role in role_auth DB with no assigned user in user_role DB] blah:(hpux.*, *) [Invalid Role in role_auth DB. Role 'blah' does not exist in the roles DB] blah:(hpux.*, *) The following example finds a bad group name: # rbacdbchk [/etc/rbac/user_role] &blah: Administrator invalid group The value 'blah' for the Group name field is bad. FILES
Database containing valid definitions of all roles. Database containing definitions of all valid authorizations. Database specifying the roles for each specified user. Database that defines the authorizations for each role. Database containing the authorization to execute specified commands, and the privileges to alter uid and gid for command execution. Database that defines the role-to-authorization to audit SEE ALSO
authadm(1M), cmdprivadm(1M), privrun(1M), rbac(5). rbacdbchk(1M)
All times are GMT -4. The time now is 01:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy