LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 06-18-2019, 05:28 PM   #16
sim0
LQ Newbie
 
Registered: Jun 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by MensaWater View Post
To do this on CentOS:
1) Make yourself a subdirectory for the download and extract that follows:
Code:
mkdir passwd
2) Change to the new subdirectory:
Code:
cd passwd
3) Download the RPM:
Code:
yumdownloader passwd
4) Above should put a file like passwd-0.79-4.el7.x86_64.rpm in the directory. RPMs can be converted to cpio backup format (similar to tar format) with the rpm2cpio command. That cpio output can be extracted with the cpio command so the following pipeline does the conversion to cpio and the extract of the files the RPM contained:
Code:
rpm2cpio passwd-0.79-4.el7.x86_64.rpm |cpio -ivBcumd
5) That will install the files in subdirectories of the one you created so your new passwd subdirectroy will contain ./usr/bin/passwd (the . is important). You can copy that into the real /usr/bin:
Code:
cp -p ./usr/bin/passwd /usr/bin/passwd
Note:
You may need to prepend the "cp" with "sudo" or some other command as regular users don't have permission to write into /usr/bin but you seem to indicate you do.
Problem solved.. thanks
 
1 members found this post helpful.
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: Cannot find 'ssh-keygen' in '/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin' venu.navat Linux - Software 3 03-08-2012 04:00 AM
Deleted /usr/lib by accident molossus Fedora 1 12-28-2010 06:23 PM
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 08:33 AM
Just deleted /usr/lib/pkgconfig by accident. Hunter2 Slackware 3 06-25-2006 07:15 PM
chsh accident; big accident. shinystuffrox *BSD 3 06-06-2005 07:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 04:41 AM.

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