NET USE command doesn't authenticate when credentials are passed as parameters - windows

I'm trying to connect to a remote WebDAV server by mapping it as a drive using NET USE command.
NET USE * <domain> /user:<username> <password>
Executing this command gives the following error:
System error 1244 has occurred.
The operation being requested was not performed because the user has
not been authenticated.
But when I execute just
NET USE * <domain>
It asks for username and then password.
Enter the user name for <domain>:
Enter the password for <domain>:
Upon entering this I can now connect to the remote location and the drive is mapped.
What is causing this error? And how can I resolve it?
These commands will be automated, so I would like to pass the credentials as parameters instead of entering when prompted.

Credits to user Larryc for his answer on Server Fault site.
I wasn't including user domain name in the username parameter of the command. I included it and it worked.
NET USE * <domain> /user:<user_domain>\<username> <password>

Related

How to set a login user account for a windows service written in Golang?

I use the package "https://pkg.go.dev/github.com/kardianos/service" to run an application written in Go as a Windows service.
I set the following attributes in service.Config:
Username: "myusername"
Option: service.KeyValue{"password": "mypassword"}
When I then install the program, I get the following error: The account name is invalid or does not exist, or the password is invalid for the account name specified.
How should I set attributes of service.Config to make the service run properly with specified the credentials when installed?
I just found out the solution myself.
Username:`DESKTOP-XXXXXX\myAcount`
Option: service.KeyValue{"password": "mypassword"}

Piping password to kinit on a windows server

We are setting up a system where we need to re-verify a user's identify before he/she is allowed to perform a specific task. The user enters his/her password into the website, and then PHP runs kinit to verify that the password is correct. We use Kerberos for authentication. This is what we successfully tried on a Linux server:
echo "password123" | kinit username#REALM.COM
The problem is that the system is running on a Windows server. We have installed kinit, but cannot seem to get the same thing to work. Running that same command, with or without the quotes, just gives us this output:
kinit: Generic preauthentication failure while getting initial credentials
Any suggestions on what could be done here?
Edit:
Running simply "kinit" and then entering the password at the prompt, works well.

Unable to login to cloudbyte elastistor, incorrect login

I am trying the host name as user name and password as entered during installation. The login screen in CLI keeps on giving incorrect login error. How to login?
The default username for elastistor is root.
Use the password as configured during installation.

Rsync error. Could not start Rsync service on Local Computer

I am facing a problem:
Could not start Rsync service on Local Computer.
Error 1069: The service did not start due to a logon failure.
Can some body please help me on this?
During the installation, you may have seen where it prompted for a user-name and password with the default user-name and password already typed in. You need to change this to that of the user you are logged in as. If you are logged in as administrator then enter the admin credential

How to reset/change expired password for DB2 Content Manager 8.4.1

I had installed IBM DB2 Content Manager 8.4.1 months ago and now I wanted to access it to continue some more work.
But when I try to log in using System Administration Client, it tells me the password is expired. The error is:
DGL0394A: Error in ::DriverManager.getConnection;[jcc][t4][2012][11248][3.50.152]
Connection authorization failure occurred. Reason: Password expired.
ERRORCODE=-4214,SQLSTATE=28000 (STATE) : ;
[SERVER = icmnsldb, USERID = icmadmin, SQL RC = -4214, SQL STATE = 28000]
I've tried looking thru the config files, using the java update command line.. and I can't find a way to change or reset the password. I can't use System Administration Client to change the passwords, since it won't log me in to begin with. Any other method I can use to reset/change the password for a DB2 CM user?
DB2 uses the operating system to authenticate users, so you need to use the OS tools to reset the icmadmin user's password. Your post is tagged as Windows, so look for the icmadmin user in either the local machine or in the domain if your server belongs to a domain.
Just use the Client for Windows on a desktop machine and not the eClient to login. It will directly notify about a expired password and you can set the new password immediately.
I faced the same issue. I logged in as root and chaged the password for db2 user by passwd . and changed in the WAS console. It worked.
In Windows, click on start > Control Panel > User Accounts > User Accounts > Manage User Accounts.
Here, select the DB2 username and click on Reset Password.
If you are on Docker, you need to perform a docker exec into the DB2 container (Linux) and then change the password for the local user that you are trying to log in to DB2 with. In my case, the name of the user was "myuser". I changed the password by executing
passwd myuser
Note that you are root by default when you exec into the container. Else use
docker exec -u root <containerName> /bin/sh

Resources