Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-19-2010, 04:55 AM
|
#1
|
Member
Registered: Jan 2010
Location: Mumbai, India
Distribution: ArchLinux, Fedora 24, Centos 7.0
Posts: 177
Rep:
|
Unable to use mkpasswd on RHEL 5.0
hi, friends
i am unable to use mkpasswd on RHEL5.0, can any one suggest me how to get it working?
i guess there must be some package responsible for this command, any ideas? please suggest
|
|
|
01-19-2010, 07:53 AM
|
#2
|
Member
Registered: Feb 2009
Distribution: Debian, CentOS 5, Gentoo, FreeBSD, Fedora, Mint, Slackware64
Posts: 208
Rep:
|
I use CentOS 5.4 which is roughly equal to RHEL 5.0. And, I can run mkpasswd with no errors:
Code:
$ mkpasswd
Aq_Yz68vk
To determine what package provides mkpasswd, I believe you can do:
Code:
rpm -q --whatprovides /usr/bin/mkpasswd
If you are getting an error or something, please post that and maybe someone might know the answer.
|
|
|
01-20-2010, 12:41 AM
|
#3
|
Member
Registered: Jan 2010
Location: Mumbai, India
Distribution: ArchLinux, Fedora 24, Centos 7.0
Posts: 177
Original Poster
Rep:
|
[root@station137 ~]# rpm -q --whatprovides mkpasswd
no package provides mkpasswd
[root@station137 ~]# mkpasswd
bash: mkpasswd: command not found
these are errors
|
|
|
01-20-2010, 12:52 AM
|
#4
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,397
|
What do you need this for? A workaround could be
Code:
echo plaintext_passwd | passwd --stdin $user
This accepts a non-encrypted passwd and updates the $user's /etc/passwd (/etc/shadow in fact) rec with the encrypted version.
|
|
|
01-20-2010, 01:02 AM
|
#5
|
Member
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724
Rep:
|
Check and try to install 'expect' package if it's not installed. Notice that /usr/bin/mkpasswd and /usr/sbin/mkpasswd are different. Beside, you can try the makepasswd.
|
|
|
01-20-2010, 07:42 AM
|
#6
|
Member
Registered: Feb 2009
Distribution: Debian, CentOS 5, Gentoo, FreeBSD, Fedora, Mint, Slackware64
Posts: 208
Rep:
|
This is what I found when I did a rpm query for mkpasswd:
expect-5.43.0-5.1
So, as mentioned by quanta, install the "expect" language and mkpasswd should come along with it.
|
|
|
01-20-2010, 01:07 PM
|
#7
|
Member
Registered: Jan 2010
Location: Mumbai, India
Distribution: ArchLinux, Fedora 24, Centos 7.0
Posts: 177
Original Poster
Rep:
|
Thank you friends!!
well i have found except package on my system and installed it, now thing is working.
thank you for all your support
well my problems was solved by installing expect package. So this topic can me closed now
any ways if anyone want to comment or provide more info would be welcomed [ ]
Last edited by pix9; 02-08-2010 at 04:47 AM.
|
|
|
All times are GMT -5. The time now is 12:26 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|