Passwd

Unix/mac questions about password changes or storage, the related `.passwd` file or `passwd` command

Sudo

The sudo command is a program for Unix and Unix-like computer operating systems that allows a user to run programs with the security privileges of another user (normally the superuser, or root)



Following commands flask_admin

Example

"Nano etc postgresql 9.x main pg_hba.conf change peer in this line local all postgres peer to local all postgres trust restart the server sudo service postgresql restart login into psql and set your passwd psql -u postgres alter user postgres with passwd your-pass"

from question  

PostgreSQL dbConnect to shiny app in ec2 instance

"Sudo -u postgres createuser pgs_root;set user passwd for the postgresql user"

from question  

Rake db:migrate not working on my postgres db

"Thanks to rfkortekaas help after changing the content in my etc postgresql 9.x main pg_hba.conf file on this line # local is for unix domain socket connections only local all all peer to local all all md5 after which i ran the following commands sudo service postgresql restart sudo -u postgres psql alter user flask_admin with passwd example dev 18"

from question  

How to deal with @ symbol in password - sqlalchemy

"Get into mysql instance sudo mysql -u root note mysql -u root will throw error error 1698 28000 access denied for user root localhost so use sudo to run this command;now to change the passwd of the root user i tried the following commands this has thrown an error error 1348 hy000 column passwd is not updatable this has thrown an error error 1348 hy000 column authentication_string is not updatable but the following command worked alter user root localhost identified by mypassword"

from question  

Access denied for user root - mysql on MAC OS

"And of course add the username and passwd that you already created on postgres if you don t have an user you can create one like this sudo -u postgres createuser -s dev sudo -u postgres psql passwd dev #here you can type the passwd you want for this user q in this example we are creating a user named dev so you add dev to the username part and change the passwd for the one you typed"

from question  

Getting bad connection error when trying to migrate in rails.

Others

Example

Some commands require sudo and so we set that up so that it does not require a passwd to be entered;alternatively you could run the jenkins slave jar after already having sudo -- not recommended

from question  

Install java on linux server programmatically

The best and much more secure way is to sudo visudo and attach nopasswd to get sudo not require a passwd;the way in the middle is using the sudo -s parameter that expect the passwd coming from standard input instead that from the terminal device

from question  

Sudo without prompt in CentOS

Second from maintenance view once you change your passwd scripts suddenly stop working and you have to update them all;fortunately as you are already using sudo there is better solution

from question  

Hide plaintext password from showing in bash script?

First most systems have configured sudo in a way to take the current user s passwd not the target user s one;to configure sudo to read the target user s passwd instead you must set

from question  

Validate password in sudo command

Therefore multiple sudo calls are also not a problem;the passwd is not read from the standard input but from the current terminal

from question  

Here Document not working with sudo su

Or you can check the man page for sudo and sudoers -- it s possible to configure accounts not to require a passwd and to limit them to particular commands when they do;this is a sudo question not a java one

from question  

Call terminal and run command through Java App

Automating sudo is slighly more complex if you need to pass the passwd but still can be done

from question  

How to run multiple perl open commands asynchronously and display output in order

For me logging in was as simple as sudo mysql -u root don t forget the sudo i really hope there should have been a message stating that ubuntu no longer used passwd when attempting to run mysql

from question  

Fresh mysql-server installation does not ask for password

Sudo -u postgres createuser viter -s this also makes viter a superuser;then you need to set the passwd for viter to match what is used in database.yml by using this command while in psql as the postgres user yourpassword viter next create each db with viter as the owner while still in the psql terminal

from question  

PG::ConnectionBad: FATAL: password authentication failed for user

Be sure to let sudo only run specific commands without passwd not all;you can configure sudo to be usable with no passwd as described here

from question  

Batch commands in linux, gnome, bash

Sudo is better in most respects but still requires a passwd which asroot does not

from question  

Executing shell commands as given UID in Python

By the way note that sudo supports many authentication methods passwd is only one of them;in particular sudo may not ask for a passwd when using nopasswd so be sure as a minimum to check for the passwd prompt to be present before writing a passwd to a process

from question  

Python subprocess stdin.write(pwd) IOError: [Errno 32] Broken pipe

Setup postgresql phppgadmin first login as the postgres user and lets create a new postgres role user sudo su postgres createuser -p --interactive --interactive - adds some initial permissions -p - means assign a passwd the default installation of phppgadmin will automatically connect to postgresql server

from question  

How to install postgresql and phppgadmin with nginx?

As of february 2018 installing brew on ubuntu mine is 17.10 machine is as simple as sudo apt install linuxbrew-wrapper then on first brew execution just type brew --help you will be asked for two installation options for recommended option type your passwd if your current user is in sudo group or if you prefer installing all the dependencies in your own home folder hit ctrl + d

from question  

Can I use Homebrew on Ubuntu?

It was simply just gain super user privilege and then enable and start rsync process sudo su enter your passwd then digit systemctl enable rsync systemctl start rsync if you don t have a systemctl based terminal just use service instead

from question  

Rsync "connection refused" error

If you need to create an new user and passwd;sudo -u postgres createuser john -s

from question  

Switched to PG! DB migration error: PG::ConnectionBad:

Example 1 - simple remote command in this example we send a simple whoami command we re telling sudo not to issue a prompt and to take its input from stdin;this makes the sudo passwd passing completely silent so the only response you get back is the output from whoami

from question  

Proper way to sudo over ssh

It may be simpler just to configure sudo such that a passwd is not needed;i assume your username is user1 and you wish that user1 may run sudo find -name vlc.png without a passwd

from question  

Inserting Sudo password in Python

Removing passwd control is even worse than using a standard passwd slightly more secure you can also make it so that only certain commands can use sudo

from question  

How can i3 config execute sudo commands

I would give sudo another look since sudo gives you more control;also the -s flag on sudo tells sudo to read a passwd from stdin rather than from a terminal so sudo would work in the context you give above

from question  

Access setuid program from web page

When you invoke a command with sudo you re asking sudo to elevate your privileges beyond what the account normally gets;this is an entirely different system with rules defined in etc sudoers which you should edit using sudo visudo that control which users are allowed to use sudo what commands they should be able to run whether they need to re-enter their passwd or not when using the command and a variety of other configuration options

from question  

Ansible: "sudo: a password is required\r\n"

Back to Home
Data comes from Stack Exchange with CC-BY-SA-4.0