Solved

Execute .NCF from a Windows Batchfile

Posted on 2000-03-10
24
234 Views
Last Modified: 2006-11-17
I want to execute a NCF on the Novell Server from a Windows batch.
I've mapped drive N: to the server and I want to do something like that:

@echo off
execute SERVER:\stop_this_service.ncf
copy N:\somedir\somefiles.* N:\otherdir\
execute SERVER:\start_this_service.ncf

I don't know how to do it!

0
Comment
Question by:benni
  • 8
  • 7
  • 3
  • +4
24 Comments
 
LVL 22

Expert Comment

by:cookre
ID: 2606415
NCFs can only be run from the console command line.  Running an NCF from a client requires a program that calls the Netware API to run an NCF on the server.  Even if you had such a utility (it would be very easy to write one), you would likely be disatisfied with the inability to synchronize your client side program with the NCF, i.e., all you can do is request execution of the NCF - control returns right away and you have no generic way to determine when the NCF has completed - or even if it started properly.
0
 

Expert Comment

by:defferrari
ID: 2609882
Benni,

This NCF is to stop and start Oracle instance ?

Both directory are on server ?
0
 
LVL 3

Expert Comment

by:sverre
ID: 2611055
Rconsole, than you have control to!
0
 
LVL 1

Expert Comment

by:andrewbrazier
ID: 2611309
No can do, a maped drive gives a "DOS" command prompt and NCF files can only be run from a "Netware" command prompt and this means at the server console and nowhere else.
One possibility is to use something like Arcserve. You can execute Netware console commands (including NCF files) pre and post job and it will also do immediate or scheduled disk to disk copies as well. If you use something else for backup check it's features, it will probably do something similar.
0
 

Author Comment

by:benni
ID: 2611669
andrewbrazier: I believe this andwers isn't correct. It should be possible to execute NCFs from a client, even if they are not synchronized to the batch.

defferrari: not oracle, one directory is a local drive

sverre: have rconsole command line possibilities?


Is there a utilities like cookre described it?

0
 
LVL 4

Expert Comment

by:pwoolford
ID: 2611777
What NW version ?
This may be possible with NW5
0
 
LVL 1

Expert Comment

by:andrewbrazier
ID: 2611795
Nope, you just can't do it. An NCF file contains Netware commands, a DOS prompt only uderstands DOS commands, try typing LOAD MONITOR at a DOS prompt and see what you get. Alternatively try typing COPY and a Netware console prompt and see what happens.
As I mentioned earlier you can do this with Arcserve or some other third party backup utility but not with DOS batch files.
As for the utility that cookre describes this would be a pretty major security hole and I wouldn't want it anywhere near my LAN even if it existed and I'm pretty certain it doesn't.
You would not expect Unix commands to work in DOS and it's the same thing with Netware, from the client side it LOOKS like DOS (F:. G:, etc), but it isn't. You only see it's command line interface at the server and this is the only place you can type in Netware commands (including NCF files).
0
 

Expert Comment

by:defferrari
ID: 2611896
If you use cron on netware and AT command of a scheduler on Windows machine, you can sync this two jobs to work fine.

# Netware CRON at 02:00
>stop service

# Windows AT command at 02:30
>copy from server to workstation

# Netware CRON at 05:00
>start service
0
 

Author Comment

by:benni
ID: 2612023
andrewbrazier: I think you misunderstand me. In fact I can run Unix commands from a Windows Batch via a telnet script. I think there should be a tool which allows to do the same with netware.
btw - rconsole gives me the complete console on a client and IMHO this is not really a security hole.

defferrari: good idea, but this is not a answer to my question
0
 

Author Comment

by:benni
ID: 2612028
pwoolford: we are using NetWare 4.2
0
 

Expert Comment

by:defferrari
ID: 2612085
pwoolford: how use access a device in a workstation from a Netware Server ?

Arcserve use Client Agent to do this.
0
 
LVL 22

Expert Comment

by:cookre
ID: 2612645
If you like, I'll write the utility for you tonight.  Bear in mind, however, it must be run from an authenticated connection under a userid with console authority (that's a requirement of the API call that submits an NCF from a client).
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:benni
ID: 2612796
cookre - you would do that for 100 points? Is it possible to set the parameters for the connection in a Inifile or via command line parameters?
0
 
LVL 22

Expert Comment

by:cookre
ID: 2612910
Proposed usage:

runncf  <servername>  <filenamewithvolume>

0
 
LVL 22

Expert Comment

by:cookre
ID: 2612923
Besides, it seems like a useful thing - I'm kinda surprised one doesn't already exist (maybe I'll find out tonight why).
0
 

Author Comment

by:benni
ID: 2612928
cookre - good, where do I set login and pw?
0
 
LVL 22

Expert Comment

by:cookre
ID: 2613265
The program assumes there is already a connection with console rights to the specified server.

Requiring a userid and password on either the command line or in an ini file would mean those items would be in plain text for prying eyes to see and snooping fingers to find.

Now, one could embed a fixed userid and password in the program, but, to make the program useful, that userid would have to be:

1) the same bindery id & password on ALL servers

2) an id with god rights to the root of the tree (or, at least, to those containers your target servers are in)

0
 
LVL 4

Expert Comment

by:Zombite
ID: 2614242
http://www.novellshareware.com/nlms.shtml#442

Nettools and some others there will do this function
0
 
LVL 22

Accepted Solution

by:
cookre earned 300 total points
ID: 2614488
As promised, here it is:
www.mindspring.com/~cookre/runncf

Yea, it was a one hour special, but, hey - it worked for me.

Your mileage may vary.
0
 

Author Comment

by:benni
ID: 2615414
Adjusted points from 100 to 300
0
 

Author Comment

by:benni
ID: 2615433
thanks cookre

it seems to work :-)

is there a way to send the output from the ncf to the console screen
at the moment I can't see what happens at the console

I increased the points a little bit, please tell me if it's not enough
0
 
LVL 3

Expert Comment

by:sverre
ID: 2615488
Use conlog on the console and just check the logfile!
0
 

Author Comment

by:benni
ID: 2615672
sverre: there are no entrys from the NCFs started via runncf
0
 
LVL 22

Expert Comment

by:cookre
ID: 2615718
That's one of the side effects of using the API call to run an NCF.  In order to have a command show up on the concole and in the console log, one has to stuff the concole buffer directly, by-passing the API call.

There is an NCP to do this, and some commercial packages use it.  Unfortunately, Novell has not publicly released the details of that NCP and I have been completely unsuccessful in prying that info from them - despite the thousands of server liscences we have with them.

I saw once that someone wrote a book that supposedly had details on all of the undocumented NCPs (I can't recall her name right now), but, the book had already been out of print (that was four years ago) and no one could find a copy anywhere.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
groupwise distribution list 1 508
novell 6 and groupwise 4 402
Novell Netware time zone 7 671
search drive 4 211
A procedure for exporting installed hotfix details of remote computers using powershell
What is Backup? Backup software creates one or more copies of the data on your digital devices in case your original data is lost or damaged. Different backup solutions protect different kinds of data and different combinations of devices. For e…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now