sudo & chdev


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users sudo & chdev
# 1  
Old 03-18-2010
sudo & chdev

I have an error when using chdev with sudo as follows;

sudo chdev -l rmt0 -a block_size=512
chdev: 0514-518 Cannot access the CuDv object class in the device
configuration database.

I've added chdev in sudoers but still get the error, I guess it's something to do with CuDv (/etc/objrepos), does sudoers require a path for this?

---------- Post updated at 03:52 AM ---------- Previous update was at 03:48 AM ----------

Quote:
Originally Posted by gefa
I have an error when using chdev with sudo as follows;

sudo chdev -l rmt0 -a block_size=512
chdev: 0514-518 Cannot access the CuDv object class in the device
configuration database.

I've added chdev in sudoers but still get the error, I guess it's something to do with CuDv (/etc/objrepos), does sudoers require a path for this?
forgot to mention this is
AIX 6100-04-02-1007
Sudo version 1.6.9p15
# 2  
Old 03-18-2010
Have only 5.3 and no 6.1 boxes available but usually that should be no problem (I guess):

Code:
root@somehost:/etc> grep tester sudoers
tester          somehost = NOPASSWD:/usr/sbin/chdev
root@somehost:/etc> su - tester
tester@somehost:/home/tester> sudo chdev -l rmt0 -a block_size=512
rmt0 changed

Maybe something with RBAC on 6.1 or a syntax error in your sudoers is the issue? If you are ok with it, I move it to the AIX sub forum.
# 3  
Old 03-18-2010
Quote:
Originally Posted by zaxxon
Have only 5.3 and no 6.1 boxes available but usually that should be no problem (I guess):

Code:
root@somehost:/etc> grep tester sudoers
tester          somehost = NOPASSWD:/usr/sbin/chdev
root@somehost:/etc> su - tester
tester@somehost:/home/tester> sudo chdev -l rmt0 -a block_size=512
rmt0 changed

Maybe something with RBAC on 6.1 or a syntax error in your sudoers is the issue? If you are ok with it, I move it to the AIX sub forum.
Thanks managed to find the issue, AIX 6 requires 'Defaults !env_reset' adding to sudoers.
# 4  
Old 01-03-2012
Quote:
Originally Posted by gefa
Thanks managed to find the issue, AIX 6 requires 'Defaults !env_reset' adding to sudoers.
Good to see you found a solution for this one that works for you.

However, disabling env_reset is a bit of an overkill. Passing the ODMDIR environment variable to the sudo session, using the following in the sudoers file, should be all that's needed here:

Code:
Defaults env_keep += "ODMDIR"

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remoting sudo commands & bypassing bashrc

What I want to do is not unique, except that our environment has a twist. I want to ssh to a remote server and issue a sudo command to run a script. This isn't working, but you'll get the gist.# ssh remotehost sudo -i -u oracle script.bashThe sudo to oracle is fine. The script.bash sets up the... (4 Replies)
Discussion started by: JustaDude
4 Replies

2. AIX

Chdev hostname change is not permanent

Dear Gurus, I have an AIX 7.1 box whose hostname is set to turtle.domain.com (FQDN) and I'm trying to change it to turtle. I'm using the below command for this: chdev -l inet0 -a hostname=turtle On running this, the hostname changes to turtle but once i reboot the machine, FQDN is back. ... (6 Replies)
Discussion started by: pocodot
6 Replies

3. Shell Programming and Scripting

Ssh & sudo

when the following command is issued the command prompt is received, how do I get past this? ssh -t usera@hosta sudo su - userb -c id (4 Replies)
Discussion started by: squrcles
4 Replies

4. Solaris

Sudo Privileges & Sudoers Group

I'm looking for some suggestions to accomplish what a specific user needs, without adding them to the "sudoers" group. I have X user, that is requesting to be able to change file permissions on items owned by others and search directories where X user doesn't have access. I'm open to any... (2 Replies)
Discussion started by: Nvizn
2 Replies

5. Shell Programming and Scripting

ssh foo.com sudo command - Prompts for sudo password as visible text. Help?

I am writing a BASH script to update a webserver and then restart Apache. It looks basically like this: #!/bin/bash rsync /path/on/local/machine/ foo.com:path/on/remote/machine/ ssh foo.com sudo /etc/init.d/apache2 reloadrsync and ssh don't prompt for a password, because I have DSA encryption... (9 Replies)
Discussion started by: fluoborate
9 Replies

6. Solaris

sudo for solaris 8 & 9

Dear ALL please can anyone tell me from where can i install sudo for solaris 8 & 9 and how i can install it in the solaris server . (1 Reply)
Discussion started by: thecobra151
1 Replies

7. UNIX for Dummies Questions & Answers

Unable to use the Sudo command. "0509-130 Symbol resolution failed for sudo because:"

Hi! I'm very new to unix, so please keep that in mind with the level of language used if you choose to help :D Thanks! When attempting to use sudo on and AIX machine with oslevel 5.1.0.0, I get the following error: exec(): 0509-036 Cannot load program sudo because of the following errors:... (1 Reply)
Discussion started by: Chloe123
1 Replies

8. AIX

AIX chdev sys0 query

Hi all chdev -l sys0 -a fullcore=flase In the above command please explain why this command is use.and what is the default value of sys0 Also it would be good if someone can elaborate on the 'sys0' thing. Thanks (3 Replies)
Discussion started by: panther20091
3 Replies

9. Solaris

Difference between sudo & RBAC

Hello Everybody I would like to know any major difference between sudo & RBAC as I am bit familiar with RBAC but not with sudo (2 Replies)
Discussion started by: girish.batra
2 Replies

10. UNIX for Advanced & Expert Users

sudo & Sox compliance

Hello, I am trying to convince my boss to stop allowing our users to login as root (superuser). Currently our users login to our unix server with their own account, then as needed, they will do an su and put in the root password. This scares me, for a bunch of reasons. Mainly, one is that we... (1 Reply)
Discussion started by: rwallaceisg
1 Replies
Login or Register to Ask a Question