Using the universal naming convention and Dir$() in a scheduled agent to access files on another server

I am trying to use the universal naming convention and Dir$() in a scheduled agent to access files on another server.

The code works if it run by the Notes client from a view action.

It also works in a scheduled agent if the files are in a directory on the Domino server.

Access to the file server directory has been set to “Everyone”.

I get a “File not found” error in the Notes log database when it fails in the scheduled agent.

==== code

Sub Initialize

path$ = “\server\directory$*.pdf”

fileName$ = Dir$( path$, 0 )

Do While fileName$ <> “”

Print "file name :  " & fileName$ 

fileName$ = Dir$() 

Loop

End Sub

====

Is there a security issue I am missing? Any ideas most welcome. Thanks.

Subject: Using the universal naming convention and Dir$() in a scheduled agent to access files on another server

It’s probably a security issue.

Which account do you use to run your Domino server?

If this account is LocalSystem, then you can’t access other servers this way.

You can try using the windows command <net use \server /user:username password> in your agent, to authenticate with a normal account before. In batchfiles this is working, but I don’t know if it works, if you call it in a notes agent.

Other possibility would be, to use an domain account to run the domino server, but I don’t know about the side effects.

Andreas Hoster

mailto:andreas.hoster@herma.de

Subject: RE: Using the universal naming convention and Dir$() in a scheduled agent to access files on another server

Vielen Dank Andreas. It was a security issue. The Domino server runs under the LocalSystem account. Using a domain account with the domino server had unhelpful side effects. But using your clue, we set the other server’s LocalSystem account and then access was allowed to the domino server, and the scheduled agent was successful. Thanks again. Bill.

Subject: RE: Using the universal naming convention and Dir$() in a scheduled agent to access files on another server

Sorry, but i don’t really understand what you did to make it work?Does the server run under the LocalSystem account, and that account is granted access on the other server’s share?