Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
L
live-installer
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
live-installer
Commits
369a1cc0
Kaydet (Commit)
369a1cc0
authored
Haz 11, 2020
tarafından
sulincix
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fixes 4
üst
6ec94d4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
22 deletions
+4
-22
installer.py
live-installer/installer.py
+4
-22
No files found.
live-installer/installer.py
Dosyayı görüntüle @
369a1cc0
...
...
@@ -117,28 +117,10 @@ class InstallerEngine:
our_current
+=
1
self
.
update_progress
(
our_current
,
our_total
,
False
,
False
,
(
"Adding new user to the system"
))
if
self
.
setup
.
ecryptfs
:
# ecryptfs looks for the /sys mount point in /etc/mtab.. which doesn't exist during the installation.
# it defaults to /sys anyway, so we just need to create an empty /etc/mtab file at this stage.
self
.
do_run_in_chroot
(
'touch /etc/mtab'
)
self
.
do_run_in_chroot
(
'modprobe ecryptfs'
)
self
.
do_run_in_chroot
(
'adduser --disabled-login --encrypt-home --gecos "{real_name}" {username}'
.
format
(
real_name
=
self
.
setup
.
real_name
.
replace
(
'"'
,
r'\"'
),
username
=
self
.
setup
.
username
))
else
:
self
.
do_run_in_chroot
(
'adduser --disabled-login --gecos "{real_name}" {username}'
.
format
(
real_name
=
self
.
setup
.
real_name
.
replace
(
'"'
,
r'\"'
),
username
=
self
.
setup
.
username
))
for
group
in
'adm audio bluetooth cdrom dialout dip fax floppy fuse lpadmin netdev plugdev powerdev sambashare scanner sudo tape users vboxusers video'
.
split
():
self
.
do_run_in_chroot
(
"adduser {user} {group}"
.
format
(
user
=
self
.
setup
.
username
,
group
=
group
))
fp
=
open
(
"/target/tmp/.passwd"
,
"w"
)
fp
.
write
(
self
.
setup
.
username
+
":"
+
self
.
setup
.
password1
+
"
\n
"
)
fp
.
close
()
self
.
do_run_in_chroot
(
"cat /tmp/.passwd | chpasswd"
)
os
.
system
(
"rm -f /target/tmp/.passwd"
)
# Lock and delete root password
self
.
do_run_in_chroot
(
"passwd -dl root"
)
#TODO: support encryption
self
.
do_run_in_chroot
(
'useradd {username}'
.
format
(
username
=
self
.
setup
.
username
))
self
.
do_run_in_chroot
(
"echo -ne
\"
{0}
\\
n{1}
\\
n
\"
| passwd {2}"
.
format
(
self
.
setup
.
password1
,
self
.
setup
.
password1
,
self
.
setup
.
username
))
self
.
do_run_in_chroot
(
"echo -ne
\"
{0}
\\
n{1}
\\
n
\"
| passwd"
.
format
(
self
.
setup
.
password1
,
self
.
setup
.
password1
))
# Set LightDM to show user list by default
self
.
do_run_in_chroot
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment