Search This Blog

Wednesday, January 29, 2014

Linux: Allow a user to execute only specific root command(s)

Sometimes you want a linux user to be able to execute root command(s). To do so, you need to modify the /etc/sudoers file (with visudo).

However, almost everyone add a line like the below:
username ALL=(ALL:ALL) ALL


Which is far from being the right thing to do. You basically just gave the user username all root rights... To do it properly, you should know the synopsis of that line:
user machine=(effective user [ : effective group ] command


With:
user : the user you want to grant access to some commands. it can be a group too, just replace user by %groupname
machine : the machine you want those rights to apply (can be a hostname, IP, ALL)
effective user : the user's rights you want your user to execute the command as (root, user1, ALL, etc)
effective group : same as above, but for the group. This is not mandatory
command : the command or command list (separated by comma. Ex. /bin/chown,reboot)

An example is allays better than a long talk, if you want to give the user user1 the rights to execute the chown command:
user1 ALL=(root) /bin/chown

Monday, January 27, 2014

Oracle DB ratios explained

Here you will find two pdf (in french and english) with the explanation of the following ratios, and what to do to improve them, as well as your database performances:

  • Buffer Cache Hit Ratio 
  • Chained Row Ratio 
  • Database CPU Time Ratio
  • Database Wait Time Ratio
  • Dictionary Cache Hit Ratio 
  • Execute to Parse Ratio 
  • Get Hit Ratio 
  • Latch Hit Ratio 
  • Library Cache Hit Ratio 
  • Parse CPU to Elapsed Ratio 
  • Pin Hit Ratio 
  • Soft-Parse Ratio 
  • Library cache reload Ratio
  • Rollback Segment Wait to Get Ratio
  • In (PGA) Memory Sort Ratio
  • Buffer Nowait Ratio
  • Redo Nowait Ratio

In french

You can hit the gv$sysmetric view to most of those ratios.