Example: Security and the command line tools
To enable WebSphere Application Server security, provide the command line tools with authentication information.
Without authentication information, the command line tools receive an AccessDenied exception when we attempt to use them with security enabled. There are multiple ways to provide authentication data:
- Most command line tools support a -username and -password option for providing basic authentication data. User ID and password for an administrative user. For example, we can use a member of the administrative console users with operator or administrator privileges, or the administrative user ID configured in the user registry. The following example demonstrates the stopNode command, which specifies command line parameters:
stopNode -username adminuser -password adminpw- We can place the authentication data in a properties file that the command line tools read. The default file for this data is the sas.client.props file in the properties directory for the current profile.
Use command-line tools