Changeset 2681
- Timestamp:
- 09/02/08 12:34:50 (3 months ago)
- Location:
- pcbsd/trunk/PCInstall
- Files:
-
- 2 modified
-
pcinstall.cpp (modified) (5 diffs)
-
pcinstall.ui (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pcbsd/trunk/PCInstall/pcinstall.cpp
r2680 r2681 500 500 } 501 501 502 //Check username password contains only letters and numbers503 if ((! passwordRegExp.exactMatch(linePassword->text())) && (linePassword->text() != "")) {504 textAcctNotify->setText(tr("Warning: Root password may normally only use letters and numbers!"));505 linePassword->setPaletteBackgroundColor(colourRed);506 ok = 1;507 }508 502 if ((linePassword->text() != linePassword2->text()) || linePassword->text().isEmpty()) 509 503 { … … 1512 1506 1513 1507 1514 1515 1508 // Save the root password 1509 QFile filePassRoot( "/mnt/tmp/setPass-Root" ); 1510 if ( filePassRoot.open( IO_WriteOnly ) ) { 1511 QTextStream streamPassRoot( &filePassRoot ); 1512 streamPassRoot << linePassword->text(); 1513 filePassRoot.close(); 1514 } 1515 1516 // Set our variables for the user passwords 1517 QFile filePassUser; 1518 QString fileNameUser, tmp; 1519 1516 1520 QFile file( "/mnt/tmp/setPass" ); 1517 1521 if ( file.open( IO_WriteOnly ) ) { 1518 1522 QTextStream stream( &file ); 1519 stream << "echo '" << linePassword->text().replace("\'","\\\'") << "' | pw usermod root -h 0\n" ; 1523 stream << "cat /tmp/setPass-Root | pw usermod root -h 0\n" ; 1524 stream << "rm /tmp/setPass-Root\n" ; 1520 1525 while ( i < 100) 1521 1526 { … … 1525 1530 break; 1526 1531 } 1532 1533 // Save the password text to file 1534 fileNameUser = "/mnt/tmp/setPass-User" + tmp.setNum(i); 1535 filePassUser.setFileName( fileNameUser ); 1536 if ( filePassUser.open( IO_WriteOnly ) ) { 1537 QTextStream streamPassUser( &filePassUser ); 1538 streamPassUser << AddPassword[i]; 1539 filePassUser.close(); 1540 } 1541 1527 1542 1528 stream << "echo '" << AddPassword[i].replace("\'","\\\'") << "' | pw useradd -n " << AddUserName[i] << " -G wheel,operator -h 0 -s " + AddShell[i] + " -d /home/" << AddUserName[i] << " -m -c \"" << AddRealName[i] << "\"\n"; 1543 stream << "cat /tmp/setPass-User" + tmp.setNum(i) + " | pw useradd -n " << AddUserName[i] << " -G wheel,operator -h 0 -s " + AddShell[i] + " -d /home/" << AddUserName[i] << " -m -c \"" << AddRealName[i] << "\"\n"; 1544 stream << "rm /tmp/setPass-User" + tmp.setNum(i) + "\n"; 1529 1545 1530 1546 stream << "chown -R " << AddUserName[i] << " /home/" << AddUserName[i] << "\n"; … … 2313 2329 2314 2330 2315 //Check username contains only letters and numbers2331 //Check username contains only letters and numbers 2316 2332 if ((! passwordRegExp.exactMatch(lineUserName->text())) && (lineUserName->text() != "")) { 2317 2333 textAcctNotify->setText(tr("Username may contain only letters and numbers!")); … … 2319 2335 ok = FALSE; 2320 2336 } 2321 2322 //Check password contains only letters and numbers2323 if ((! passwordRegExp.exactMatch(lineUserPassword->text())) && (lineUserPassword->text() != "")) {2324 textAcctNotify->setText(tr("User password may contain only letters and numbers!"));2325 lineUserPassword->setPaletteBackgroundColor(colourRed);2326 ok = FALSE;2327 }2328 2329 2330 2337 2331 2338 -
pcbsd/trunk/PCInstall/pcinstall.ui
r2656 r2681 29 29 </property> 30 30 <widget class="QWidget" name="WizardPage" > 31 <property name="geometry" >32 <rect>33 <x>6</x>34 <y>34</y>35 <width>988</width>36 <height>651</height>37 </rect>38 </property>39 31 <attribute name="title" > 40 32 <string>Select Language and Keyboard</string> … … 431 423 </property> 432 424 <property name="text" > 433 <string>Version 7 -Alpha</string>425 <string>Version 7</string> 434 426 </property> 435 427 <property name="alignment" > … … 5571 5563 </widget> 5572 5564 <widget class="QWidget" name="WizardPage" > 5565 <property name="geometry" > 5566 <rect> 5567 <x>0</x> 5568 <y>0</y> 5569 <width>100</width> 5570 <height>30</height> 5571 </rect> 5572 </property> 5573 5573 <attribute name="title" > 5574 5574 <string>Installing PC-BSD</string>
