Tag: password

Update Password Life Time in Oracle Database

Update Password Life Time in Oracle Database

For testing database, disable password life time will be able to avoid following error

ORA-28002: the password will expire within 7 days

Login as sys

Using sys password (created during database instance creation) to login to sysdba

sqlplus sys@xepdb1 as sysdba

Find out profile for the user

select username, profile from dba_users where username like '<user_id>';

Check profile settings

select RESOURCE_NAME,resource_type,LIMIT from dba_profiles where PROFILE='<profile_name>';

Update profile

ALTER PROFILE <profile_name> LIMIT PASSWORD_LIFE_TIME UNLIMITED;

Check the password status

SELECT ACCOUNT_STATUS FROM DBA_USERS WHERE USERNAME='<user_id>'

Change password

# sqlplus <user_id>/<pwd>@xepdb1
...

SQL> password
Changing password for <user_id>
Old password:
New password:
Retype new password:
Password changed
SQL> quit

References

How to resolve ORA-28002: the password will expire

Bitwarden Docker Installation

Bitwarden Docker Installation

Update: Bitwarden could not detect new and update password in browsers in most of cases. No matter how easy it can be used, without this auto detection feature, it is useless.

Bitwarden is an opensource password manager, can be self-hosted, and can be installed as docker container. It supports many browsers and OSes.

Steps

Create docker-compose.yaml

Create docker-compose.yaml, and make sure

  • SIGNUPS_ALLOWED is 'true'
# docker-compose.yml
version: '3'

services:
  bitwarden:
    image: bitwardenrs/server
    restart: always
    ports:
      - 8000:80
    volumes:
      - ./bw-data:/data
    environment:
      WEBSOCKET_ENABLED: 'true' # Required to use websockets
      SIGNUPS_ALLOWED: 'true'   # set to false to disable signups

Create

Run following command, in the directory contains docker-compose.yaml

docker-compose up -d

Configure HTTPS in NGINX

Without HTTPS, bitwarden doesn't allow new user registration.

Add following statements in server location definition.

server {
    server_name  nginx_host;
    listen 443 ssl;

    ...

    location /bw {
        rewrite /bw(.*) /$1 break;
        proxy_pass  'http://192.168.1.222:8000';
        proxy_redirect     off;
        proxy_set_header   Host $host;
    }
    ...
}

Then the URL of bitwarden will be https://nginx_host/bw/

Register

Access https://nginx_host/bw/, and register email and password.

Disable new user creation

  • Destory old bitwarden instance
docker-compose down
  • Update docker-compose.yaml file
SIGNUPS_ALLOWED: 'false';
  • Recreate instance
docker-compose up -d

Trun on 2FA

In website, go to Settings => Two-step Login ...

Install clients

Go to bitwarden website to install.

References

Run Bitwarden Password Manager in Docker Container
Install and Deploy - Linux
The Best Password Managers to Secure Your Digital Life
Host your own FREE Password Manager with your Synology NAS
Install and Sync All of Your Devices
Connect Clients to your Instance
Request Hosting Installation Id & Key

Supply password to rsync

Supply password to rsync

Via environment variable

Use environment variable RSYNC_PASSWORD to provide password to rsync command

export RSYNC_PASSWORD=$PASSWORD
rsync -zvr source destination

or

env RSYNC_PASSWORD=$PASSWORD rsync -zvr source destination

Via password file

rsync --password-file=rsync_pass -zvr source destination

Some other methods

Such as sshpass and public key.

References

How can I rsync without prompt for password, without using public key authentication?