How to change user (not admin) password in PgAdmin4 - postgresql

I have created a new user for my new schema. I want to set its password but I am unable to find how to do it in PgAdmin4. I know how to do it with SQL but I was wondering if such basic functionality is really missing from PgAdmin.

To set somebody else password, connect to the DB, on the left panel select user/roles, click on the user of interest, properties, then go on the definition tab and enter the new password.

Related

What role/policy I can map for PostgreSQL USER so that he can change his existing password

What role/policy/command I can use/map for PostgreSQL USER so that he can change on his own existing password?
CREATE USER abcd with ENCRYPTED PASSWORD 'P#wd123!';
GRANT rds_iam, app_readonly TO abcd;
There is a dialog to change the password of the currently connected user securely with pgAdmin4: Select the server in the tree view, then select "Object" / "Change Password..." from the menu.

xrdp - auto join session

I have an xrdp setup on my raspberry pi.
XRDP:
I only have one session in the list (PI).
Is it possible to skip this screen and go directly to the remote control after connecting?
Thanks
For anyone dealing with this, I'd try saving the configuration on your RDP client. For Windows RDP go to "Options" on the bottom left, and then under "General" enter your specifications. In this case, leave the username and password blank and make sure to save it. From then on those credentials will be used to auto login.
For other clients like Royal TS, right-click on the connection and open the "Properties" dialog. Going to "Credentials" located on the left navigation bar will allow you to save any log in configurations you want to use.
I've never tried this without a username and password, so if it doesn't work with blank configurations, I'd consider setting up a username and password if you want to bypass this page.

How to start SQL Server from Batch file?

I'm trying to start SQL Server Express from command line using the following command:
net start MSSQL$SQLEXPRESS
But I get this error:
System error 5 has occurred.
Access is denied.
I have administrator privilege and my OS is Windows 7.
Thanks to #SamiKuhmonen my problem was solved.
I created batch file (named start sqlserver.bat) conatins the following command:
net start MSSQL$SQLEXPRESS
I created a shortcut to my batch file.
And run it as administrator like in this
screenshot
Run Registry Editor (RegEdit).
Navigate to HKEY_LOCAL_MACHINE.
Right click on HKEY_LOCAL_MACHINE, and select Permissions .
Click on the Advanced button.
In “Advanced Security Settings” dialog window, go to the Owner tab.
Select and highlight the currently logged on user name or Administrators group (if user is a member of Administrators” in the Change owner to: box.
Select the tick the check box for Replace owner on subcontainers and objects option, and click OK.
Back in “Permissions” dialog window, click on Add… button.
Enter everyone in the Enter the object names to select text box, and click on the Check Names button.
Hope it helps!!!
If there is error with the user ID entered, correct the error. If there is no error found, click the OK button.
Back in “Permissions” dialog window, select and highlight the newly added user name in Group or user names: section, and tick the checkbox for Allow access right next to Full Control in the Permissions for Everyone section.
simply create the batch file as eg.bat
and it's content as :start ssms

SQL Login Properties - User Mapping

Of course I can use SMS to check the box below... but how would I do it with a script or from SQLCMD?
To create a login:
CREATE LOGIN login_name
WITH PASSWORD = 'yourpassword';
To link a user to login:
USE YourDatabaseHere;
CREATE USER your_user FOR LOGIN [login_name];
If you want, to read the exact script by your SMS, you can check the DB and then click on Script link (upper of your window) and show the script.
Now I found the solution:
USE [master]
GO
CREATE LOGIN [Domain\Groupname] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO
USE [MyDatabase]
GO
CREATE USER [Domain\Groupname] FOR LOGIN [Domain\Groupname]
GO
EXEC sp_addrolemember N'db_datareader', N'Domain\Groupname';
GO

Request Tracker for Users created without privileges

I have configured request tracker4 to be an interdepartmental helpdesk solution. The current setup is that users will login to RT using LDAP. Once logged in there account is automatically created. However, their account is created with no privileges.
To fix this I have been having to go to Tools-->Configuration-->Select then put in the users DN name and clicking add I then have to check the box "Let this user be granted rights (Privileged)" I have also tried setting Set($AutoCreate, Privileged); but no luck.
I looked at the user accounts in the sqlite database and noticed that when new user logs in they are indeed created in the database. But with no privileges.
709|tuser3|*NO-PASSWORD*|||||||tuser3|||||||tuser3||tuser3|||||||||||||1|2013-03-08 13:47:38|1|2013-03-08 13:47:38
791|Mayra|*NO-PASSWORD*||||Mayra#**************||Main Office|Mayra Hernandez|||||||Mayra||Mayra||**************|||||||||||1|2013-04-03 21:46:36|1|2013-04-03 21:46:36
797|sdrakeford|*NO-PASSWORD*||Autocreated when added as a watcher||sdrakeford#**************|||Sophia C. Drakeford|||||||sdrakeford||sdrakeford|||||||||||||1|2013-04-04 13:18:58|1|2013-04-04 13:18:58
827|Robert.Troy|*NO-PASSWORD*||||Robert.Troy#*******************||Main Office|Robert Troy|||||||Robert.Troy||Robert.Troy||***************|||||||||||1|2013-04-04 16:11:58|1|2013-04-04 16:11:59
Am I missing something, because usually these things are quite obvious.
The $AutoCreate option takes a hashref with all of the default options you want to pass to the User Create method. Try something like:
Set($AutoCreate, {
Privileged => 1
});
(As an aside, it's generally not recommended to run a production instance on sqlite. You might want to consider converting to MySQL or Postgres.)