The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > AIX
Google UNIX.COM


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
mksysb backup rrlog AIX 1 09-06-2007 12:12 PM
mksysb backup testing TheEngineer AIX 6 04-17-2007 03:53 AM
mksysb backup granador AIX 1 02-23-2007 04:05 PM
AIX v.5.1 - system and user data backup Sezgin AIX 5 01-08-2007 02:29 AM
AIX + backup or mksysb (yes i did a search) Optimus_P UNIX for Dummies Questions & Answers 5 08-08-2001 03:16 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-30-2008
Registered User
 

Join Date: Nov 2007
Posts: 11
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
How can I authorize a non-root user to do a system backup with 'mksysb'?

I use AIX 5.2 I want to allow a non-root user to do a system backup with 'mksysb' command.
I try to add 'ManageBackup' Role to that non-root user but it have an error "ksh: mksysb: 0403-006 Execute permission denied."
What should I do?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-30-2008
Bughunter Extraordinaire
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 942
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Have you considered using "sudo"? With this package installed you can specify certain commands to be run by a (group of) user(s) as root. You can even limit this to the prescribed usage of certain parameters (for instance, a user might be allowed to do a "ls -l" as root, but not a "ls -a", etc.).

It looks like you could tailor this to exactly your needs.

I hope this helps.

bakunin
Reply With Quote
  #3 (permalink)  
Old 04-30-2008
grial's Avatar
El UNIX es como un toro
 

Join Date: Jun 2006
Location: Madrid (Spain)
Posts: 531
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
You might also SETUID the mksysb binary. Though, I would prefer (and already use) sudo...
Setting this bit is very dangerous and so, you should be VERY careful If you consider using it...

Regards.
Reply With Quote
  #4 (permalink)  
Old 04-30-2008
Bughunter Extraordinaire
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 942
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Quote:
Originally Posted by grial View Post
You might also SETUID the mksysb binary.
Sorry, but "mksysb" is a shellscript. See the output of "file /usr/bin/mksysb".

Anyways, i suppose we agree upon "sudo" being by far the preferable solution.

bakunin
Reply With Quote
  #5 (permalink)  
Old 04-30-2008
Registered User
 

Join Date: Nov 2007
Posts: 11
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Quote:
Originally Posted by bakunin View Post
Have you considered using "sudo"? With this package installed you can specify certain commands to be run by a (group of) user(s) as root. You can even limit this to the prescribed usage of certain parameters (for instance, a user might be allowed to do a "ls -l" as root, but not a "ls -a", etc.).

It looks like you could tailor this to exactly your needs.

I hope this helps.

bakunin

How can I know, is it "sudo" installed in the system or not ?
because I not sure was installed or not

from where install "sudo" ?
and how can I use "sudo" ?
I do not have knowledge about "sudo" .

thank you very much
Reply With Quote
  #6 (permalink)  
Old 04-30-2008
Moderator
 

Join Date: Feb 2007
Posts: 1,411
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Quote:
Originally Posted by AIX122 View Post
How can I know, is it "sudo" installed in the system or not ?
because I not sure was installed or not
Try the whereis command or sudo -V.

Quote:
Originally Posted by AIX122 View Post
from where install "sudo" ?
and how can I use "sudo" ?
I do not have knowledge about "sudo" .

thank you very much
A useful link:

Install and configure sudo in AIX - ITtoolboxWiki

Regards
Reply With Quote
  #7 (permalink)  
Old 05-01-2008
grial's Avatar
El UNIX es como un toro
 

Join Date: Jun 2006
Location: Madrid (Spain)
Posts: 531
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Quote:
Originally Posted by bakunin View Post
Sorry, but "mksysb" is a shellscript. See the output of "file /usr/bin/mksysb".

Anyways, i suppose we agree upon "sudo" being by far the preferable solution.

bakunin
Oooops! No way. I just assumed it was a binnary file so forget it, I'm sorry.
Of course, sudo is as you said: by far, the preferable solution.
Reply With Quote
  #8 (permalink)  
Old 05-01-2008
Registered User
 

Join Date: Mar 2008
Posts: 26
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
You can get a pre-compiled version of sudo for AIX at

IBM AIX Toolbox Download Page - Alphabetical Listing

You install with "rpm -i sudo*rpm"

(If you don't have rpm.rte installed on your OS you will need that first to install the sudo rpm.)

Now my memory is a little fuzzy but the following should work:

Enter "visudo" and add the line:

username hostname=/usr/bin/mksysb

:wq to write and quit visudo

Now the user would enter the command "sudo mksysb" and it will prompt for the users password and log what has happened in the syslog.

Last edited by prichard; 05-01-2008 at 01:58 PM. Reason: Added more detail, corrected some spelling.
Reply With Quote
  #9 (permalink)  
Old 05-06-2008
Registered User
 

Join Date: Nov 2007
Posts: 11
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Now, it is done and work by 'sudo'

thank you very much to everyone has helped me
Reply With Quote
Google UNIX.COM
Reply

Tags
linux

Thread Tools
Display Modes


The 50 most popular UNIX and Linux searches.
Google Search Cloud for The UNIX and Linux Forums
"inappropriate ioctl for device" 421 service not available, remote server has closed connection ^m ascii eof autosys awk trim bash eval bash exec bash for loop bash subroutine boot: cannot open kernel/sparcv9/unix close_wait curses.h dead.letter find grep grep multiple lines grep or grep recursive grep unique inappropriate ioctl for device logrotate.conf lynx javascript mailx attachment make: fatal error: command failed for target `all-recursive' mget mtime perl array length ping port read awk output into multiple variables replace space by comma , perl script scp recursive segmentation fault(coredump) sftp batch sftp script snoop unix stale nfs file handle syn_sent tar exclude unix unix .profile unix com unix for loop unix forum unix forums unix interview questions unix memory usage unix mtime unix simulator unix.com while loop within while loop shell script


All times are GMT -7. The time now is 05:24 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102