Creating a user for NavUserPassword credentials

AitorEGAitorEG Member Posts: 342
Hi everyone!

I've just made an installation for NAV2018, and the credentials for use it are "NavUserPassword". Of course, at first, I've made a demo instalaltion, with the cronus database. But, I can't connecgt to the RTC, because there's not any user created for this credentials in the database. How can I create any user for connecting to the RTC?

Thank you very much

Best Answer

Answers

  • AitorEGAitorEG Member Posts: 342
    afarr wrote: »
    You can use the Nav admin shell to create users (you have to run the admin shell "as administrator").
    Saurav's post is for NAV 2016, there might be some differences for NAV 2018:
    https://saurav-nav.blogspot.com.mt/2015/12/add-user-to-microsoft-dynamics-nav-2016.html


    Another possible approach is to create a second service, connecting to the same database, but using Windows authentication, get in using Windows authentication, and then add other users, with a password. There are also SQL scripts available to add Windows authentication users.

    Thanks, I'll work on it!!
  • AitorEGAitorEG Member Posts: 342
    afarr wrote: »
    You can use the Nav admin shell to create users (you have to run the admin shell "as administrator").
    Saurav's post is for NAV 2016, there might be some differences for NAV 2018:
    https://saurav-nav.blogspot.com.mt/2015/12/add-user-to-microsoft-dynamics-nav-2016.html


    Another possible approach is to create a second service, connecting to the same database, but using Windows authentication, get in using Windows authentication, and then add other users, with a password. There are also SQL scripts available to add Windows authentication users.

    When creating the new user with a password, I've got the next error:

    w1mnod4owgd1.png
    The 'Password' parameter can not be linked. Cannot convert "Betea123"...
    

    Which should be the correct format for a password?
  • AitorEGAitorEG Member Posts: 342
    edited 2018-02-28
    Solved with:
    PS C:\Users\Administrador> New-NAVServerUser -ServerInstance DynamicsNAV110 -UserName betea -ChangePasswordAtNextLogOn -LicenseType Full -Password (ConvertTo-SecureString 'onM1crosoft1' -AsPlainText -Force) -State Enabled
    

    Thank you!
  • RemkoDRemkoD Member Posts: 100
    edited 2018-02-28
    If you check the help on the New-NAVServerUser you will notice you need a securestring.
    Get-Help New-NAVServerUser -detailed
    
    -Password <SecureString>
            Specifies a protected password for the Microsoft Dynamics NAV user.
            The password is only used when the credential type for authenticating users who try to access Microsoft Dynamics NAV is set to NavUserPassword.
    

    Example
    $serverInstance = 'DynamicsNAV100'   
    $username = "TestUser01"
    $securePass = ConvertTo-SecureSTring 'testPassword01' -AsPlainText -Force
    
    New-NAVServerUser -ServerInstance $serverInstance -UserName $username -Password $securePass -LicenseType Full -State Enabled
    
  • RemkoDRemkoD Member Posts: 100
    Ah, you've resolved it yourself :) . Good luck further.
  • AitorEGAitorEG Member Posts: 342
    RemkoD wrote: »
    Ah, you've resolved it yourself :) . Good luck further.

    Really appreciate your help, thank you!
Sign In or Register to comment.