06-18-2019, 05:28 PM
|
#16
|
LQ Newbie
Registered: Jun 2019
Posts: 6
Original Poster
Rep:
|
Quote:
Originally Posted by MensaWater
To do this on CentOS:
1) Make yourself a subdirectory for the download and extract that follows:
2) Change to the new subdirectory:
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.
|