|
|
|
@ -74,6 +74,8 @@ CreateUserJob::exec()
|
|
|
|
|
|
|
|
|
|
if ( gs->contains( "sudoersGroup" ) && !gs->value( "sudoersGroup" ).toString().isEmpty() )
|
|
|
|
|
{
|
|
|
|
|
cDebug() << "[CREATEUSER]: preparing sudoers";
|
|
|
|
|
|
|
|
|
|
QFileInfo sudoersFi( destDir.absoluteFilePath( "etc/sudoers.d/10-installer" ) );
|
|
|
|
|
|
|
|
|
|
if ( !sudoersFi.absoluteDir().exists() )
|
|
|
|
@ -96,6 +98,8 @@ CreateUserJob::exec()
|
|
|
|
|
return Calamares::JobResult::error( tr( "Cannot chmod sudoers file." ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cDebug() << "[CREATEUSER]: preparing groups";
|
|
|
|
|
|
|
|
|
|
QFileInfo groupsFi( destDir.absoluteFilePath( "etc/group" ) );
|
|
|
|
|
QFile groupsFile( groupsFi.absoluteFilePath() );
|
|
|
|
|
if ( !groupsFile.open( QIODevice::ReadOnly | QIODevice::Text ) )
|
|
|
|
@ -141,6 +145,8 @@ CreateUserJob::exec()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cDebug() << "[CREATEUSER]: creating user";
|
|
|
|
|
|
|
|
|
|
QStringList useradd { "useradd", "-m", "-U" };
|
|
|
|
|
QString shell = gs->value( "userShell" ).toString();
|
|
|
|
|
if ( !shell.isEmpty() )
|
|
|
|
|