Hello,

On my RHEL 6.2 server, the crypted password for root in /etc/shadow starts 
with $6$, instead of $1$. As I am installing a diskless cluster, I wish to 
propagate the root password of my server to the image, therefore, I 
entered the crypted value of root passwort in xCAT table passwd in the 
following entry :
"system","root","$6$xxxxxxxxxxxxxxxxxxx",,, 
in my postinstall script. Unfortunately packimage considers passwords as 
crypted only when they start with $1$.

I worked around the problem using the following modification in 
/opt/xcat/lib/perl/xCAT_plugin/packimage.pm.

[root@xcatsmp1 xCAT_plugin]# diff -ru packimage.pm.ORIG packimage.pm
--- packimage.pm.ORIG   2012-08-13 13:23:36.318720221 +0200
+++ packimage.pm        2012-07-26 19:05:55.779842727 +0200
@@ -303,7 +303,8 @@
        my @shadents = <$shadow>;
        close($shadow);
        open($shadow,">","$rootimg_dir/etc/shadow");
-       unless ($pass =~ /^\$1\$/) {
+       #AJT unless ($pass =~ /^\$1\$/) {
+       unless ($pass =~ /^\$\d\$/) {
           $pass = crypt($pass,'$1$'.genpassword(8));
        }
        print $shadow "root:$pass:13880:0:99999:7:::\n";
[root@xcatsmp1 xCAT_plugin]#

Could this be included in some future xCAT release ?

Best regards,



Antoine Tabary
 17 Avenue De L'europe

Certified HPC I/T Specialist
 Bois Colombes Cedex, 92275
6520AA
 France
ITS
 



 



 

e-mail:
[email protected]
 


 
 


Sauf indication contraire ci-dessus:/ Unless stated otherwise above:
Compagnie IBM France
Siège Social : 17 avenue de l'Europe, 92275 Bois-Colombes Cedex
RCS Nanterre 552 118 465
Forme Sociale : S.A.S.
Capital Social : 645.605.931,30 ?
SIREN/SIRET : 552 118 465 03644 - Code NAF 6202A 

<<image/gif>>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user

Reply via email to