[donotprint]
Tutorial details | |
---|---|
Difficulty | Intermediate (rss) |
Root privileges | Yes |
Requirements | None |
Time | 10m |
Step # 1: Install Development Tools On A CentOS/RHEL/Scientific Linux
You need to GCC compiler and tools on a CentOS/RHEL box. Type the following command to install them:
# yum -y groupinstall "Development tools"
It will install the following packages and setup a basic development environment:
autoconf automake binutils bison flex gcc gcc-c++ gettext libtool make patch pkgconfig redhat-rpm-config rpm-build Default Packages: byacc cscope ctags cvs diffstat doxygen elfutils gcc-gfortran git indent intltool patchutils rcs subversion swig systemtap Optional Packages: ElectricFence ant babel bzr ccache chrpath clips clips-devel clips-doc clips-emacs clips-xclips clipsmm-devel clipsmm-doc cmake cmucl colordiff compat-gcc-34 compat-gcc-34-c++ compat-gcc-34-g77 cvsps darcs dejagnu email2trac expect ftnchek gcc-gnat gcc-java gcc-objc gcc-objc++ ghc git haskell-platform imake jpackage-utils kdewebdev libstdc++-docs lua mercurial mock mod_dav_svn nasm nqc nqc-doc ocaml perltidy python-docs qgit rpmdevtools rpmlint sbcl systemtap-sdt-devel systemtap-server trac trac-git-plugin trac-mercurial-plugin trac-webadmin translate-toolkit
You also need to install additional development libs for the gpass. First, enable epel repo on a CentOS/RHEL:
# yum install epel-release
Use the yum command:
# yum install libgnomeui-devel mhash-devel libmcrypt-devel
Step #2: Download gpass
Use the wget command to download the source code, enter:
$ cd /tmp
## $ wget http://projects.netlab.jp/gpass/release/gpass-0.5.1.tar.gz
$ wget https://github.com/raffael-sfm/gpass/releases/download/0.5.1/gpass-0.5.1.tar.gz
Sample outputs:
--2011-08-26 16:35:36-- http://projects.netlab.jp/gpass/release/gpass-0.5.1.tar.gz Resolving projects.netlab.jp... 221.186.184.69 Connecting to projects.netlab.jp|221.186.184.69|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 512614 (501K) [application/x-tar] Saving to: “gpass-0.5.1.tar.gz” 100%[======================================>] 512,614 158K/s in 3.2s 2011-08-26 16:35:39 (158 KB/s) - “gpass-0.5.1.tar.gz” saved [512614/512614]
Step #3: Compile gpass
Type the following commands to untar tar ball:
$ tar xvf gpass-0.5.1.tar.gz
$ cd gpass-0.5.1
You need set link options using the LDFLAGS shell variable as follows:
$ export LDFLAGS='-export-dynamic'
Configure the software, enter:
$ ./configure
Sample outputs:
checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes ..... ... .. config.status: executing intltool commands config.status: executing depfiles commands config.status: executing default-1 commands config.status: executing po/stamp-it commands ================================================================== Configuration: Source code location : . Install location : /usr/local Compiler : gcc Unit test(make check): no
Finally to build the software, enter:
$ make
To install the same, enter:
$ sudo make install
How Do I Use the Gpass?
Type the following command:
$ gpass
- Fig.01: Running gpass for the first time
- Fig.02: Setup a master password
- Fig.03: Passwords are stored in ~/.gpass/
- Fig.04: Gpass in action
- Fig.05: Adding a new entry
- Fig.06: Copy password
How do I used gpass over ssh based session?
Simply, type the following command from your local Linux or Unix based terminal to login into the remote host and run gpass command over X based forwarding:
$ ssh -X user@server1.cyberciti.biz
$ gpass
How Do I Backup My Passwords?
Simply copy $HOME/.gpass/ to backup media such as pen drive or external hard disk using the cp command:
$ cp -avr $HOME/.gpass/ /media/usbpen/backup/
How Do I Restore My Passwords?
Type the following command (assuming that backup usb pen is mounted at /media/usbpen/):
$ cp -avr /media/usbpen/backup/.gpass/* $HOME/.gpass/
Further readings:
🐧 1 comment so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
I no longer recommend gpass as this software is outdate for a long time, it does compile on a CentOS/RHEL 5.x/6.x/7.x tho.