LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 01-19-2010, 04:55 AM   #1
pix9
Member
 
Registered: Jan 2010
Location: Mumbai, India
Distribution: ArchLinux, Fedora 24, Centos 7.0
Posts: 177

Rep: Reputation: 19
Question 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
 
Old 01-19-2010, 07:53 AM   #2
nuwen52
Member
 
Registered: Feb 2009
Distribution: Debian, CentOS 5, Gentoo, FreeBSD, Fedora, Mint, Slackware64
Posts: 208

Rep: Reputation: 46
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.
 
Old 01-20-2010, 12:41 AM   #3
pix9
Member
 
Registered: Jan 2010
Location: Mumbai, India
Distribution: ArchLinux, Fedora 24, Centos 7.0
Posts: 177

Original Poster
Rep: Reputation: 19
[root@station137 ~]# rpm -q --whatprovides mkpasswd
no package provides mkpasswd

[root@station137 ~]# mkpasswd
bash: mkpasswd: command not found


these are errors
 
Old 01-20-2010, 12:52 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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.
 
Old 01-20-2010, 01:02 AM   #5
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 101Reputation: 101
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.
 
Old 01-20-2010, 07:42 AM   #6
nuwen52
Member
 
Registered: Feb 2009
Distribution: Debian, CentOS 5, Gentoo, FreeBSD, Fedora, Mint, Slackware64
Posts: 208

Rep: Reputation: 46
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.
 
Old 01-20-2010, 01:07 PM   #7
pix9
Member
 
Registered: Jan 2010
Location: Mumbai, India
Distribution: ArchLinux, Fedora 24, Centos 7.0
Posts: 177

Original Poster
Rep: Reputation: 19
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to get the Gui,Dell Vostro 1310,unable to get the Gui after installing RHEL 5 getasif Linux - Laptop and Netbook 1 09-06-2009 05:46 PM
Unable to boot to RHEL 4 32 bit after installing RHEL 64 - bit raj_ksrt Linux - Software 1 04-27-2009 09:44 AM
mkpasswd johnblaze00 Linux - Newbie 4 03-04-2008 06:52 PM
mkpasswd LinuxRam Linux - Security 1 08-24-2004 03:24 AM
mkpasswd gadfly Slackware 2 09-13-2003 09:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration