Archives for Linux - Page 5
Redhat: How to list all disks availble
On Redhat, run this command lsblk You will see this NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 1024M 0 rom sda 8:0 0 100G 0 disk...
How to tell git which private key to use?
Environment variable GIT_SSH_COMMAND: From Git version , you can use the environment variable GIT_SSH_COMMAND like this: GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_example" git clone example Note that -i can sometimes be overridden...
Ubuntu: No need to provide password when run sudo
nano /etc/sudoers %sudo ALL=(ALL) NOPASSWD:ALL #update this line
View list of users in a group
getent group groupname
Add new user and add it to sudo group
With and later If the user already exists sudo usermod -aG sudo <username> To create the user adduser <username> --group sudo
Dovecot: (keywords_update_records): assertion failed: (data_offset >= sizeof(struct mail_index_record))
This means your index is corrupted, we need to rebuild it find /user/emailfolder -name ‘dovecot*’ -type f -delete”
Apache: AuthType configured with no corresponding authorization directives
This happens when we upgrade my Apache to , it turns out that we haven’t got removed the old authentication configuration completely, we just remove the require valid...
Secure Web/Mail/Database with certificate
Web/Mail/Database can use the same certificate to allow its client to connect to the server. Postfix: postconf -e smtpd_tls_cert_file='/etc/pki/tls/' postconf -e smtpd_tls_key_file='/etc/pki/tls/' postconf -e smtpd_tls_CAfile='/etc/pki/tls/' Dovecot (POP3/IMAP server) SSL...
Ubuntu: cp copy overwrite without prompting
when you run: cp -rf /source/* /destination , it always ask you to confirm the overwrite action. Root cause: it’s probably the cp has been alias as cp -i...
Python: Realtime web print out
There are some situationĀ when we run a time-consuming process, we need to see the output of that command to see its progress. Normally, we would have to wait...