- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- RBAC FOR USER
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2010 07:57 AM
тАО03-11-2010 07:57 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2010 10:45 PM
тАО03-11-2010 10:45 PM
Re: RBAC FOR USER
what is the interval (24 or 48 hrs old logfiles) you want to delet log files.
Monitoring cron job means what exactly you want to do??
Chandra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2010 11:17 PM
тАО03-11-2010 11:17 PM
Re: RBAC FOR USER
> to create an user only for deleting archive log files
Usually, log files are owned by the user that actually start the daemon that generates the logs. Most of them are started by root. You should make a cron job for user root that will do the job.
Why do you want to create another user for this job? You would need to perform some additional steps like su-ing as the users that will have the right to modify that log files.
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2010 04:46 AM
тАО03-12-2010 04:46 AM
Re: RBAC FOR USER
we need to monitor oracle archive log directory
ex: -
root@IC2DBVR1:/ora_log2/HMIMESV2/arch #ls -lrt
total 37734648
-rw-r----- 1 oracle oinstall 491625472 Mar 9 17:17 HMIMESV2_1_10868_617656652.arc
-rw-r----- 1 oracle oinstall 491633664 Mar 9 18:09 HMIMESV2_1_10869_617656652.arc
-rw-r----- 1 oracle oinstall 491707392 Mar 9 19:57 HMIMESV2_1_10870_617656652.arc
-rw-r----- 1 oracle oinstall 491625472 Mar 9 22:14 HMIMESV2_1_10871_617656652.arc
-rw-r----- 1 oracle oinstall 491627520 Mar 10 00:09 HMIMESV2_1_10872_617656652.arc
-rw-r----- 1 oracle oinstall 491630592 Mar 10 02:01 HMIMESV2_1_10873_617656652.arc
-rw-r----- 1 oracle oinstall 491617280 Mar 10 04:16 HMIMESV2_1_10874_617656652.arc
-rw-r----- 1 oracle oinstall 491635712 Mar 10 06:31 HMIMESV2_1_10875_617656652.arc
-rw-r----- 1 oracle oinstall 491618304 Mar 10 08:34 HMIMESV2_1_10876_617656652.arc
-rw-r----- 1 oracle oinstall 496939008 Mar 10 10:22 HMIMESV2_1_10877_617656652.arc
-rw-r----- 1 oracle oinstall 491639808 Mar 10 11:32 HMIMESV2_1_10878_617656652.arc
-rw-r----- 1 oracle oinstall 491617280 Mar 10 13:32 HMIMESV2_1_10879_617656652.arc
-rw-r----- 1 oracle oinstall 498763776 Mar 10 15:00 HMIMESV2_1_10880_617656652.arc
-rw-r----- 1 oracle oinstall 491716608 Mar 10 15:39 HMIMESV2_1_10881_617656652.arc
-rw-r----- 1 oracle oinstall 491629568 Mar 10 17:29 HMIMESV2_1_10882_617656652.arc
-rw-r----- 1 oracle oinstall 491626496 Mar 10 19:03 HMIMESV2_1_10883_617656652.arc
-rw-r----- 1 oracle oinstall 491654144 Mar 10 21:30 HMIMESV2_1_10884_617656652.arc
-rw-r----- 1 oracle oinstall 491621376 Mar 10 23:32 HMIMESV2_1_10885_617656652.arc
-rw-r----- 1 oracle oinstall 491633664 Mar 11 01:10 HMIMESV2_1_10886_617656652.arc
-rw-r----- 1 oracle oinstall 491626496 Mar 11 03:24 HMIMESV2_1_10887_617656652.arc
-rw-r----- 1 oracle oinstall 491640832 Mar 11 05:35 HMIMESV2_1_10888_617656652.arc
-rw-r----- 1 oracle oinstall 491660288 Mar 11 07:20 HMIMESV2_1_10889_617656652.arc
-rw-r----- 1 oracle oinstall 491635712 Mar 11 09:14 HMIMESV2_1_10890_617656652.arc
-rw-r----- 1 oracle oinstall 491619328 Mar 11 10:57 HMIMESV2_1_10891_617656652.arc
-rw-r----- 1 oracle oinstall 491661312 Mar 11 13:16 HMIMESV2_1_10892_617656652.arc
-rw-r----- 1 oracle oinstall 491625472 Mar 11 15:22 HMIMESV2_1_10893_617656652.arc
-rw-r----- 1 oracle oinstall 495903744 Mar 11 17:04 HMIMESV2_1_10894_617656652.arc
-rw-r----- 1 oracle oinstall 491626496 Mar 11 18:10 HMIMESV2_1_10895_617656652.arc
-rw-r----- 1 oracle oinstall 491638784 Mar 11 20:14 HMIMESV2_1_10896_617656652.arc
-rw-r----- 1 oracle oinstall 491684864 Mar 11 22:31 HMIMESV2_1_10897_617656652.arc
-rw-r----- 1 oracle oinstall 492123136 Mar 12 00:16 HMIMESV2_1_10898_617656652.arc
size when it reaches 70% , need to reduce to 40 -50% instead of deleting sinlge file i need group delete based on date...while using wild card mistakenly deleted all the files in that folder then restored from Tape to manage the situation...it was archive log folder so i managed little bit but to avoid these kind of behaviour need to create specific user to delete the logs from particular dir on daily basis...
IN solaris we can create role based access control like any specific user can access prmission to use particular command only ..like to know about the same in HP- UX...
TX in advance.
Vadivel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2010 05:03 AM
тАО03-12-2010 05:03 AM
SolutionThis should work as arc files always have the same size, so you can do the math to match your 40-50 percent.
I would suggest to make a cron job for the user oracle and add some logging messages in /tmp
----------------------------------------
PASTRATE=20
DIR=path_to_arc_files
cd $DIR
NR=`ls -t HMI*arc|wc -l`
ARCSET=($(ls -t HMI*arc))
while [ $NR -ge $PASTRATE ]; do
NR=$( expr $NR - 1 );
echo rm -rf `echo ${ARCSET[$NR]}`;
done
-----------------------------------------
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2010 05:07 AM
тАО03-12-2010 05:07 AM
Re: RBAC FOR USER
I have echoed the actual command for you to know what is happening (what will be the rm command). When happy with it, just remove the first echo (I suppose you know what I am talking about - I can not be pursued for loss of data. Use it at your risk.).
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2010 04:11 AM
тАО03-13-2010 04:11 AM