How To Linux Random Password Generator in Command Line:
i.
1. [sankar@CSSW2013NOC3 ~]$ pwd
/home/sankar
2. [sankar@CSSW2013NOC3 ~]$ vim .bashrc
Note:Append the bellow code:
genpasswd() { local l=$1 [ "$l" == "" ] && l=16 tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs }
3. [sankar@CSSW2013NOC3 ~]$
source ~/.bashrc
4. To generate random password, enter:
[sankar@CSSW2013NOC3 ~]$ genpasswd
dZJgIfIY60KB4lNo
[sankar@CSSW2013NOC3 ~]$ genpasswd 8
P_UlFer_
[sankar@CSSW2013NOC3 ~]$ genpasswd 9
_FxwL4h2D
[sankar@CSSW2013NOC3 ~]$ genpasswd 10
qW9CGfhRYw
ii.
1. [sankar@CSSW2013NOC3 ~]$ which mkpasswd
/usr/bin/which: no mkpasswd in (/usr/lib/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/sankar/bin)
2. [root@CSSW2013NOC3 sankar]# yum install expect
Installed:
expect.i686 0:5.44.1.15-4.el6
Dependency Installed:
tcl.i686 1:8.5.7-6.el6
Complete!
3. [root@CSSW2013NOC3 sankar]# yum whatprovides */mkpasswd
expect-5.44.1.15-4.el6.i686 : A program-script interaction and testing utility
Repo : installed
Matched from:
Filename : /usr/bin/mkpasswd
4. [sankar@CSSW2013NOC3 ~]$ mkpasswd
Is>91Hqat
Thank you for such a wonderful Information !!
ReplyDeleteHere is a list of Top LINUX INTERVIEW QUESTIONS
Linux FTP vsftpd Interview Questions
SSH Interview Questions
Apache Interview Questions
Nagios Interview questions
IPTABLES Interview Questions
Ldap Server Interview Questions
LVM Interview questions
Sendmail Server Interview Questions
YUM Interview Questions
NFS Interview Questions
Read More at :- Linux Troubleshooting
Thank you for sharing this Information.
ReplyDeleteI also found Various useful links related to Devops, Docker & Kubernetes
Kubernetes Kubectl Commands CheatSheet
Introduction to Kubernetes Networking
Basic Concept of Kubernetes
Kubernetes Sheetsheat
Docker Basic Tutorial
Linux Sar Command Tutorial
Linux Interview Questions and Answers
Kubernetes Interview Question and Answers
Docker Interview Question and Answers
OpenStack Interview Questions and Answers