HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to start/stop Windows Services from HP-UX / Li...
Operating System - HP-UX
1833059
Members
2770
Online
110049
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2008 02:16 PM
08-07-2008 02:16 PM
How to start/stop Windows Services from HP-UX / Linux
This is an informational post to help others do what I was unable to find documented anywhere else.
For doing multi-tiered product start/stops for backups, maintenance and reboots, it is not unusual to have a script that stops the various tiers. An example being a front end web-server, application server, and database server. If the suite runs on Unix/Linux then this is not an issue as trusts can be established natively to handle this both securely and efficiently. Same goes for an all Microsoft based suite. The problem in this case is that the Web Front End is an IIS server on Windows with the application and database servers on Unix/Linux.
I found one way that uses Cygwin to run and sshd process that would allow the setup of trust for running an application. But that requires a lot of non-native applications that must be configured properly to restart on reboot and adds a lot of complexity. I was certain this was the direction I needed to take.
I went onto a Linux machine and looked at the Samba/CIFS binaries and found the net command. It was also on both an HPUX 11.11 and 11.23 host but required updating to B.02.02.02 to get the required functionality. Testing against various MS servers I found it to be the proper solution without requiring Unix/Linux emulation on Windows for the task. Additionally there are methods to have Samba encrypt the Windows Domain password for maximum security when used in scripts.
To stop a service:
net rpc service stop " -U [%] -S
To start a service:
net rpc service start " -U [%] -S
I hope this keeps others from needing to to hours of Googling to find this tip.
For doing multi-tiered product start/stops for backups, maintenance and reboots, it is not unusual to have a script that stops the various tiers. An example being a front end web-server, application server, and database server. If the suite runs on Unix/Linux then this is not an issue as trusts can be established natively to handle this both securely and efficiently. Same goes for an all Microsoft based suite. The problem in this case is that the Web Front End is an IIS server on Windows with the application and database servers on Unix/Linux.
I found one way that uses Cygwin to run and sshd process that would allow the setup of trust for running an application. But that requires a lot of non-native applications that must be configured properly to restart on reboot and adds a lot of complexity. I was certain this was the direction I needed to take.
I went onto a Linux machine and looked at the Samba/CIFS binaries and found the net command. It was also on both an HPUX 11.11 and 11.23 host but required updating to B.02.02.02 to get the required functionality. Testing against various MS servers I found it to be the proper solution without requiring Unix/Linux emulation on Windows for the task. Additionally there are methods to have Samba encrypt the Windows Domain password for maximum security when used in scripts.
To stop a service:
net rpc service stop "
To start a service:
net rpc service start "
I hope this keeps others from needing to to hours of Googling to find this tip.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2008 03:59 PM
08-07-2008 03:59 PM
Re: How to start/stop Windows Services from HP-UX / Linux
Shalom,
You can set up a windows desk top to jump onto a Unix or Linus system and even run commands start and stop.
Windows itself has been structured in such a way to prevent that.
There is a service for Windows Called Unix Services that can be installed and provide some interoperability with Unix.
For a Linux or Unix machine to jump on a Windows machine and run commands is much more difficult.
There are ssh servers for Windows, no doubt, but do they provide the ability to run services and commands in batch mode or as administrator. The answer to this question is I personally do not know.
The better path to go if possible is to host the web portion of this application on a apache sever running under Unix or Linux where one simple script can control start and stop of all services.
SEP
You can set up a windows desk top to jump onto a Unix or Linus system and even run commands start and stop.
Windows itself has been structured in such a way to prevent that.
There is a service for Windows Called Unix Services that can be installed and provide some interoperability with Unix.
For a Linux or Unix machine to jump on a Windows machine and run commands is much more difficult.
There are ssh servers for Windows, no doubt, but do they provide the ability to run services and commands in batch mode or as administrator. The answer to this question is I personally do not know.
The better path to go if possible is to host the web portion of this application on a apache sever running under Unix or Linux where one simple script can control start and stop of all services.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2008 06:15 AM
08-08-2008 06:15 AM
Re: How to start/stop Windows Services from HP-UX / Linux
Oh I guess I missed in my stated intent.
What I was explaining was a way to do the process from within a script without having to resort to ssh or remote desktops.
The Samba suite for Unix/Linux provides a very nice set of features to interact between Unix/Linux and Windows.
Cygwin with SSH works as well but the Windows Admins really like the simplicity of the "net rpc" commands for this purpose.
What I was explaining was a way to do the process from within a script without having to resort to ssh or remote desktops.
The Samba suite for Unix/Linux provides a very nice set of features to interact between Unix/Linux and Windows.
Cygwin with SSH works as well but the Windows Admins really like the simplicity of the "net rpc" commands for this purpose.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP