for Windows
Command
wmic bios get serialnumber
What tools can be used to modify the node manager user name and password for a standalone OHS 12c domain?
Note: A standalone domain is a container for system components, such as Oracle HTTP Server. It has a directory structure similar to an Oracle WebLogic Server Domain, but it does not contain an Administration Server or Managed Servers. It can contain one or more instances of system components of the same type, such as Oracle HTTP Server, or a mix of system component types. Reference 1.4.2 Standalone Domain
The steps are as follows:
1. Stop the Oracle HTTP Server component and the Node Manager (NM) :
2. Invoke WLST offline:
3. Read in the domain:
4. Get the security MBean:
5. Change the NM user name:
Need to provide a node manager user
name on this step, this can be an old user name. Otherwise, the NM
password may not modify correctly.
6. Change the NM password then commit the changes. You can give a clear text password such as 'welcome1'.
The encrypted password will be stored in /u01/oracle/config/ohs_domain/nodemanager/nm_password.properties.
Checking timestamps you can see that the following files have been updated:
/u01/oracle/config/ohs_domain/config/config.xml
/u01/oracle/config/ohs_domain/config/nodemanager/nm_password.properties
7. Restart NM:
8. Finally, restart OHS
9. It is possible to prevent the prompt for the NM password on
each OHS startup by storing the password in an encrypted form using a
key store with the command:
10. If the old password was previously stored in a key store before the password was changed, the cached key store files need to be removed before restarting the OHS component:
11. If required, the new password can then be re-stored using the same command:
To Bottom |
Let see how we can grant normal user root access by adding to root group.
# adduser user1 # adduser user2 # groupadd test
These are the groups I have in my Linux box.
# groups root bin daemon sys adm disk wheel
I am going to add user1 to root group as follows:
# usermod -G root user1
The command given below provides the existing user with the root privilege
# usermod -g 0 -o root_user
I have added a new user, 'user3' to the root group using one single command:
# useradd -m -G root user3 # groups user3 user3 : user3 root
Another option using useradd command
useradd -c “Imitation Root” -d /home/root_user -m -k /etc/skel -s /bin/bash -u 0 -o -g root root_user
Edit /etc/passwd for the particular user. Change the user's UID and GID to '0'. This will give root permissions to user.
root:x:0:0:root:/root:/bin/bash temproot:x:128:128:temproot
Now, temproot user should have root privilege:
root:x:0:0:root:/root:/bin/bash temproot:x:0:0:temproot
Note: This is not the recommended method for granting root access
The sudo configuration file is /etc/sudoers and you can edit this file using visudo command: # visudo.
Using visudo protects from conflicts and guarantees that the right syntax is used.
To give full access to specific users
Add the entry given below in the file:
bob, tom ALL=(ALL) ALL
Following this method is not a good idea because this allows both bob and tom to use the su command to grant themselves permanent root privileges. Thereby skipping the command logging features of sudo.
Granting access to specific files to one particular user
This entry allows bob and all the other members of the group operator to gain access to all the program files in the /sbin and /usr/sbin directories, as well as the privilege of running the command /usr/oracle/backup.pl.
bob, %operator ALL= /sbin/, /usr/sbin, /usr/oracle/backup.pl
If you have any questions or thoughts to share on this topic, use the feedback form.