Skip to content

Conversation

d3flex
Copy link
Contributor

@d3flex d3flex commented Aug 18, 2025

No description provided.

Copy link

Great PR! Please pay attention to the following items before merging:

Files matching docs/*.asciidoc:

This is an automatically generated QA checklist based on modified files.

Copy link
Contributor

@Martchus Martchus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are you fixing here? sudo sudo … is supposed to work just fine.

@@ -408,7 +408,7 @@ specify the user and database name and run it as user `postgres`:

[source,sh]
----
sudo sudo -u postgres openqa-setup-db your_username openqa-local`
sudo su -u postgres openqa-setup-db your_username openqa-local
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sudo su -u postgres openqa-setup-db your_username openqa-local
sudo -u postgres openqa-setup-db your_username openqa-local

or (if really needed)

Suggested change
sudo su -u postgres openqa-setup-db your_username openqa-local
sudo su - postgres openqa-setup-db your_username openqa-local

su does not have -u option

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

personally I use sudo -u postgres and I would have remove the su but it is another reference which give the command as sudo su -u postgres. https://github.com/os-autoinst/openQA/pull/6665/files#diff-4d6d1050121df87969e32770abd50500a1fbda9f136db4fbb374fe05a236f2c2R393

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reference you are mentioning gives sudo su - postgres, the missing u is not a typo 😉

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just using the sudo -u postgres?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sudo sudo -u postgres command is useful if you're not already root. If you just run sudo -u postgres as your normal user you might be prompted for the password of the postgres user (depending on the sudo configuration) which you probably wouldn't know.

@d3flex
Copy link
Contributor Author

d3flex commented Aug 18, 2025

sudo sudo

ok. I didnt try it. As I said in another comment I personally use sudo -u postgres and I thought this sudo sudo meant to be the same as https://github.com/os-autoinst/openQA/pull/6665/files#diff-4d6d1050121df87969e32770abd50500a1fbda9f136db4fbb374fe05a236f2c2R393

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants