how can I use "net use" on a remote computer

Liesinger Horst 0 Reputation points
2024-10-04T09:09:51.0833333+00:00

I login remote with openssh and a public key and need to use data on a share.

But if I try:

net use s: \server\share

I get the answer:

Logon failure: the user has not been granted the requested logon type at this computer.

If I login with name and password, it works !?!

How can I fix that problem?

I need to run a script on Linux to start a program on Windows which needs access to a share!

Windows for business Windows Server Devices and deployment Configure application groups
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. MotoX80 36,291 Reputation points
    2024-10-04T12:23:39.6833333+00:00

    On the "net use" command, specify a "/user:" and password.

    C:\>net use /?
    The syntax of this command is:
    NET USE
    [devicename | *] [\\computername\sharename[\volume] [password | *]]
            [/USER:[domainname\]username]
            [/USER:[dotted domain name\]username]
            [/USER:[username@dotted domain name]
            [/SMARTCARD]
            [/SAVECRED]
            [/REQUIREINTEGRITY]
            [/REQUIREPRIVACY]
            [/WRITETHROUGH]
            [/TRANSPORT:{TCP | QUIC} [/SKIPCERTCHECK]]
            [/REQUESTCOMPRESSION:{YES | NO}]
            [/GLOBAL]
            [[/DELETE] [/GLOBAL]]]
    
    0 comments No comments

  2. Anonymous
    2024-10-04T12:36:35.23+00:00

    Hello,

    Thank you for posting in Q&A forum.

    To resolve the error "The user has not been granted the requested logon type on this computer", you should ensure that the logged-in user and all groups to which they belong are allowed to log on locally to this computer. For details, you can refer to the following link:

    https://spgeeks.devoworx.com/the-user-has-not-been-granted-the-requested-logon-type-at-this-computer/#the-user-has-not-been-granted-the-requested-logon-type-at-this-computer

    I hope the information above is helpful.

    Best regards

    Zunhui

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.