In general it is a good idea and a valid safety measure to forbid direct root-logins. Still, someone has to become root from time to time and nobody can be expected to do 400 systems manually. Locking the door makes sense. To block it with masonry without creating another entry is idiotic.
If you have Ansible then you have some working ssh-connection with the possibility to execute something with root-privileges because this is how Ansible contacts its clients. Write an Ansible-routine then and deploy it to all eligible systems. This is the preferred solution
If you, for some reason, can't do that, use the ssh-connection directly: use the existing ssh-keys to connect to the systems and run the command(s) with root privileges the same way Ansible does it. You can put that in a script which does that in a loop and cycles through all the systems to be deployed. I once wrote such a script for a site where no Ansible or similar tool was available, here is the core function of it. It won't run outright without the rest of the solution (~1500 lines of code, too much to post it) but you might use it to create your own solution.
The function gets a hostname and executes a list of commands stored in an array by connecting to the host using a globally defined username and executes one command each iteration of the main loop. The success/failure of each command is then logged (f_CmdLog() and f_CmdErr()):
We have quite a few threads about this subject. I have collected some of them and arranged them by the OS which is primarily discussed in the thread. That is because the exact procedure depends on the OS involved. What's more, since you often need to interact with the boot process, the... (0 Replies)
Hi folks,
I'm trying to install a program, and I want to place some of the executables into /usr/bin so that they can be executed from any folder on the computer. I've been giveng the root password, but told never to log in directly as root. Instead, I can wait for a password prompt. However, I... (2 Replies)
Hello. I searched the internet for answers and don't seem to find any for about a day now.
My problem. I want to su to a non-root account non-interactively, e.g. if I want to temporarily become prdusr, I want to su prdusr without keying prdusr's password every time.
What I want is... (10 Replies)
Hi Friends.
I am new to scripting now i want to change the root password using the script with standard password.
which is the easy scripting to learn for the beginner, Thanks in advance. (2 Replies)
Hello All,
I have several solaris boxes running Solaris 8. When changing root passwords on them, all will simply ask for the new root password to change and of course to re-type the new password. One of the systems however asks for the existing root password before it will display the new password... (8 Replies)
I have several clients (over 120) connected to my server. I want to push some patch to all the client using a script which copies the file from the server to a specific path on the client and then installs it.
But for installation of the patch, it needs to be done thorough root login on client.... (7 Replies)
Hi All
Hope it's okay to post on this sub-forum, couldn't find a better place
I've got a 480R running solaris 8 with veritas volume manager managing all filesystems, including an encapsulated root disk (I believe the root disk is encapsulated as one of the root mirror disks has an entry under... (1 Reply)
We are having a little problem on a server. We want that some users should be able to do e.g. sudo and become root, but with the restriction that the user can't change root password. That is, a guarantee that we still can login to that server and become root no matter of what the other users will... (2 Replies)
i do not have root on a solairs 10 server , however i do have the root role, i was wondering if I can change the root password as a a role with the passwd command? I have not tried yet.
and do i have to use the # chgkey -p afterwards?
i need to patch is why i am asking.
thanks (1 Reply)
Discussion started by: goya
1 Replies
LEARN ABOUT X11R4
asadmin-restart-instance
asadmin-restart-instance(1AS) User Commands asadmin-restart-instance(1AS)NAME
asadmin-restart-instance, restart-instance - restarts the specified server instance and all the services associated with it
SYNOPSIS
restart-instance [--user admin_user] [--password admin_password] [--host localhost] [--port 4848] [--local=false] [--domain domain_name]
[--passwordfile filename] [--secure|-s]instance_name
Use the restart-instance to restart the instance with the instance name specified. The restart-instance command can be run both locally and
remotely. To restart remotely, the administration server must be running on the hostname and port number specified. The user authenticates
using the password identified for the administration server. Additionally, the instance must already exist within the domain served by the
administration server, and the instance must be running. The restart-instance command is not supported on Windows.
OPTIONS --user administrative user associated for the instance.
--password administrative password corresponding to the administrative user.
--host host name of the machine hosting the administrative instance.
--port administrative port number associated with the administrative host.
--local determines if the command should delegate the request to administrative instance or run locally.
--domain name of the domain.
--passwordfile file containing passwords appropriate for the command (e.g., administrative instance).
--secure if true, uses SSL/TLS to communicate with the administrative instance.
OPERANDS
instance_name name of the instance to be restarted.
Example 1: Using restart-instance in local mode
asadmin> restart-instance --local --domain domain1 server1
Instance server1 started
Where: server1 is the name of the instance restarted on the domain1 domain.
Example 2: Using restart-instance in remote mode
asadmin> restart-instance --user admin --password adminadmin --host bluestar --port 4848 server1
Instance server1 started
Where: server1 is the name of the instance restarted. The restarted instance is associated with the user, password, host, and port number
specified.
EXIT STATUS
0 command executed successfully
1 error in executing the command
INTERFACE EQUIVALENT
Server Instance page
asadmin-delete-instance(1AS), asadmin-start-instance(1AS), asadmin-create-instance(1AS), asadmin-stop-instance(1AS), asadmin-start-
appserv(1AS), asadmin-stop-appserv(1AS), asadmin-start-domain(1AS), asadmin-stop-domain(1AS)J2EE 1.4 SDK March 2004 asadmin-restart-instance(1AS)