Validating user input in shell script

Posted by / 05-Jun-2019 18:10

Validating user input in shell script

Connect to the host (in this case it’s our cloud control server), edit /etc/sudoers file, put remark sign before “Defaults requiretty” add a user (i.e.

oracle): As soon as you save the changes, oracle will be added to sudoers and be able to run commands as root with sudo.

Ascii Doc is highly configurable: both the Ascii Doc source file syntax and the backend output markups (which can be almost any type of SGML/XML markup) can be customized and extended by the user.

Doc Book has emerged as the de facto standard Open Source documentation format.

We can manually enter required information of host or we can use auto-discovery method. Nmap requires root privileges to be able to use raw sockets for “Syn Scanning” (a method to detect open ports through firewalls).

If we’ll use auto discovery, we need an active agent to discover targets in network. So we need to configure “privilege delegation” in the host of our agent (which we’ll use for scanning).

Gokhan Atil is a database administrator who has hands-on experience with both RDBMS and no SQL databases, and strong background on software development.

He is certified as Oracle Certified Professional (OCP) and is awarded as Oracle ACE (in 2011) and Oracle ACE Director (in 2016) for his continuous contributions to the Oracle users community.

In OEM Cloud Control 12c, we can “Add Host Targets Wizard” which is accessible from the web interface.Click “setup”, “security” and then “privilege delegation”.Currently I have only one active agent (it’s the agent installed on OEM Cloud Control server), so I’ll configure privilege delegation for it. Select “sudo”, enter “/usr/bin/sudo -u %RUNAS% %COMMAND%” as sudo command. So we said that this host supports sudo for privilege delegation but in fact, we haven’t configured sudo yet.I could add this host to /etc/hosts file of my cloud control to see its name instead of its IP. Click “deploy agent” to start installing Management Agent to target server. Click “setup”, “add target”, “add targets manually”, then click “add host”.Click “add” button to enter hostname (or IP) of the target server you want to add. Next steps are same with adding “discovered targets”, you enter the location to install agent, enter the credentials then click next.

validating user input in shell script-75validating user input in shell script-8validating user input in shell script-36