How to add Sysadmin login to SQL Server?

sysadmin is a server role; it can be applied to any login. When installing SQL Server a login sa is created with this privilege; you can specify the password when you’re installing SQL Server. Or you can create your own login: CREATE LOGIN adminuser WITH PASSWORD = ‘ABCDegf123′; GO EXEC master..sp_addsrvrolemember @loginame = N’adminuser’, @rolename … Read more

What’s the easiest way to get a user’s full name on a Linux/POSIX system?

You don’t specify a programming language, so I’ll assume you want to use the shell; here’s an answer for Posix shells. Two steps to this: get the appropriate record, then get the field you want from that record. First, getting the account record is done by querying the passwd table: $ user_name=foo $ user_record=”$(getent passwd … Read more

Creating and managing a Facebook app from a Business Account [closed]

‘Business’ or advertising accounts can’t manage apps – if at some point in the past you were able to create an app using a business account this was a bug or loophole and shouldn’t have been possible – only real verified user accounts should be able to create and manage apps. It’s also possible to … Read more

How to grant full permission to a file created by my application for ALL users?

Note to people using this. When using literal strings for the FileSystemAccessRule, it should be WellKnownSidType.WorldSid instead of “everyone”. The reason is because there are multiple Window languages and Everyone only applies to EN ones, so for Spanish, it might be “Todos” (or something else). using System.Security.AccessControl; using System.Security.Principal; using System.IO; private void GrantAccess(string fullPath) … Read more

Detect if running as Administrator with or without elevated privileges?

Try this out: using Microsoft.Win32; using System; using System.Diagnostics; using System.Runtime.InteropServices; using System.Security.Principal; public static class UacHelper { private const string uacRegistryKey = “Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System”; private const string uacRegistryValue = “EnableLUA”; private static uint STANDARD_RIGHTS_READ = 0x00020000; private static uint TOKEN_QUERY = 0x0008; private static uint TOKEN_READ = (STANDARD_RIGHTS_READ | TOKEN_QUERY); [DllImport(“advapi32.dll”, SetLastError = true)] [return: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)