101

There is another way, which I now use in preference to the runas /netonly method. You can add the credentials to your profile in Windows using the Credential Manager found in the Windows control panel. Open Credential Manager Click "Add A Windows Credential" Populate the "internet or network address" field with the name and port number of the SQL instance ...


68

You are attempting to pass Windows credentials in plain text from the connection string of an application. This simply isn't how Windows authentication works, and largely defeats the purpose. You also can't just create the same username with the same password in your own domain, and expect that to magically work. Domain name is still part of the validation -...


30

(Note: Not much of this is relevant to readers using PostgreSQL 9.2 or above from the EDB installers, which now have a greatly simplified default install using the NETWORK SERVICE, though you can still configure other accounts). I have used net user postgres postgres to reset the password for my database but instead of a success message I am getting "...


26

​​​​​​​​​​Here is a quick-and-dirty method for checking out how MySQL performs successful authentication. Please run this query: SELECT USER(),CURRENT_USER(); USER() reports how you attempted to authenticate in mysqld CURRENT_USER() reports how you were allowed to authenticate by mysqld Sometimes, USER() and CURRENT_USER() are different. That's because ...


22

Every machine in the chain from your desktop to the server you are calling has to be Kerberos enabled for the trust to advance past the first hop. So, yes the server needs to trust the user for delegation. The "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'" almost always indicates a delegation problem. Your Windows Account must have access to ...


21

Command line arguments are subject to interpretation by the system's command shell, changing the behavior of the command or changing the value of the arguments before they are passed into the called program. When an argument (such as the value for --password) contains an character that the shell may interpret, they need to be either quoted (usually ...


20

The '...AnyDatabase' roles should be added to the admin database for the user: use admin db.createUser({ user: "mongoadmin" , pwd: "mongoadmin", roles: ["userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase"]}) Any database: Database User Roles Database Administration Roles Admin database: Cluster Administration Roles Backup and ...


18

You can check it in the registry: HKLM\Software\Microsoft\Microsoft SQL Server\ [instancename] \MSSqlServer The current mode is recorded in the LoginMode key. Values (DWORD) can be: 1 = Windows Authentication mode 2 = SQL Server and Windows Authentication mode Note: 0 is equivalent to 2 You still need access to the Registry (and the server)


17

I think you have anonymous users Try running this: SELECT user,host,password FROM mysql.user WHERE user=''; This will show what anonymous users exist. Most likely, you will see a line with a blank user, host %, and a blank password as shown below: mysql> select user,host,password from mysql.user; +-----------+-------------+-----------------------------...


15

The IPv6 addresses starting with fe80: are link-local addresses. They cannot be routed across different subnets or the internet. They are for communication between machines connected to the same LAN only. The link-local range is defined as fe80::/10. If you trust everybody on your local LAN then you could do host all all fe80::/10 trust If you don't ...


15

We found that with contained databases / contained users you must specify: GRANT CONNECT TO [YOUR_USER] Otherwise CONNECT seems to be revoked by default. Once we made the above change, we could access the database.


15

Another approach is to try logging in, using SQL authentication, with an obviously fake account that won't succeed. You can then use notepad to open up the ERRORLOG file in C:\Program Files\Microsoft SQL Server\$instance folder$\MSSQL\Log\ and see either this error... Error: 18456, Severity: 14, State: 58. Login failed for user 'polly_wants_a_cracker'. ...


14

'Cannot generate SSPI context' is a generic error. It can be caused by many issues, like an outaded password, clock drift, Active Directory access permissions, failure to register an SPN and so on and so forth. There is no solution to this problem. The only 'solution' is to investigate the cause, as per KB811889 and/or Troubleshooting Kerberos Errors. ...


13

The words "securely", "exposing", "outside" and "database" do not belong together. Under no circumstance should you ever expose a SQL server to the internet. It's a very bad idea. So your question really should be: How do we give access to our SQL server to remote locations? The answer: VPN. The remote users should establish a VPN connection to your ...


12

Did you look anywhere? Right-click the server and choose Properties, then select the Security screen. Then, log in using your Windows auth admin account, and set the password for the sa SQL auth account. ALTER LOGIN sa WITH PASSWORD = 'strong password here';


12

On connection pop up click on options Then make sure the "Trust server certificate" is checked


11

Create matching usernames and passwords. It really is that simple. For your example, create an account for User1 on Server1 with the same password as on PC1. Just in case this is an issue you're having with connecting SSMS with a non-domain account, that requires jumping through an additional hoop. Some applications don't support stored usernames and ...


11

This appears to be a authentication scheme problem. If my memory serves correctly, the appearance of the ANONYMOUS LOGON is indicative of NTLM being used instead of Kerberos. If your SQL Server service is running under a domain credential, you will need to ensure there is a Service Principle Name (SPN) present for SQL Server. The syntax of the SetSPN ...


11

There are two ways to handle this. One option is to login to the windows machine as a local administrator, start SQL Server in single user mode (-m startup switch) and you will now be able to get into your SQL server as a sysadmin using Windows authentication. The other option is to quite simply change back to mixed mode by modifying the registry in ...


10

IMHO You do not need to physically split it up. Yet, it would be nice to cache it. If the users table uses the MyISAM Storage Engine, you have a nice advantage. Since MyISAM only caches indexes, you could do two things You could create a custom key cache just to load MyISAM index for the users table only You could index the username and password to force ...


10

I know what you did. Do this: SELECT `User`, `Grant_priv` FROM `mysql`.`user` WHERE `User` = 'root'; You will probably notice it returns a 'N' for Grant_priv. So do this: UPDATE `mysql`.`user` SET `Grant_priv` = 'Y' WHERE `User` = 'root'; FLUSH PRIVILEGES; SELECT `User`, `Grant_priv` FROM `mysql`.`user`; And walla! Hope that helps.


10

In a fresh install from a few days ago, the second line of my pg_hba.conf is local all all peer I believe this is the one that makes your connection attempt fail. The order of rules matter here: the first one that matches the access method, username, database name and source IP range will be considered. If it fails, then there ...


8

This has always happened, back to SQL Server 2000. Without schema, how does SQL Server know you want to put it in the dbo schema? The only way to specify a default schema is to : use SQL logins (not Windows) run as "sysadmin" Neither of these is acceptable Best practice is to always qualify schema for every object reference for DDL and DML. There are ...


8

Windows Authentication is going to be the most secure means, as opposed to SQL Server Authentication. The reason behind this is because with Windows Authentication, the OS handles the auth as opposed to SQL Server handling it with its respective method. When you use Windows Auth, SQL Server just uses the authentication token that is stored when you log ...


8

On the command line, use something like the following, if you have no choice... mysql -uTheUseerNAme -pThePassword DbName -h HostName --skip-secure-auth Hope this helps someone, as this was my problem connecting from a Linux


8

The documentation to the rescue: UPDATE [...] For schemas, allows access to objects contained in the specified schema (assuming that the objects' own privilege requirements are also met). Essentially this allows the grantee to "look up" objects within the schema. Without this permission, it is still possible to see the object names, e.g. by ...


8

For a long time, MySQL has supported different authentication plugins, basically programable pieces of code to demonstrate that a mysql accounts is onwed by whever claims so. The original way to do that is to setup a password, hash it in a particular way, and store it on the mysql.user table. However, it is not the only way you can authenticate, for example:...


7

It sounds from your description like this Excel sheet will be used as a sort of interactive report. If that's the case, I encourage you to try out Reporting Services. It's included with every edition of SQL Server, ever since 2005. This way, accessing the report only requires connecting to the report server with a web browser, rather than going directly to ...


7

No, if the user connects to SQL Server using a SQL Authentication login, there is no way to determine from that which Windows login was responsible. SQL Server can only record the information it has been provided, and when you use SQL Authentication, no Windows login / domain / group information is passed to SQL Server. You can look at DMVs like sys....


7

Traffic will be encrypted regardless of the client encryption specification when you turn on the Force Encryption option on the server side (SSCM-->SQL Server Network Configuration-->Protocols for MSSQLSERVER-->Properties-->Flags-->Force Encryption). If you don't install a certificate from a trusted CA, SQL Server will use a self-signed certificate. Clients ...


Only top voted, non community-wiki answers of a minimum length are eligible