Quick shell change for user in Unix or Linux

In order to change shell for a particular user of Unix/Linux system without editing /etc/passwd file manually just use command: chsh -s /path/to/shell username for example, to change shell to ‘sh’ from ‘bash’ for user ‘viper’, use command: chsh -s /bin/sh viper

Read more →

 

Encryption files with GPG without user intervention (batch)

I usually encrypt files with GPG with symmetric algorithms when I have to transmit files over insecure channel: for example I encrypt backup files stored at my USB stick and I’m sure that if it’s stolen or lost my files are in safety. Encryption without user intervention can be used when you wish to perform automatic (runs with cron) backup procedure and protect backup files. To encrypt file /tmp/file.tgz by […]

Read more →

 

Make linux shell scripts encrypted

One day it came to my mind that bash scripts I was developing for a long time (approximately 5000 lines) should be encrypted in order not to be viewed by everyone… Thanks to heaven there is utility written by Francisco Javier Rosales García SHC that allows to create a stripped binary executable version of the script. This utility is included into many Linux distributions’ repositories (I’ve used it in Ubuntu […]

Read more →