fix postinstall user creation/modification (fixes #750907)
We were appending to /etc/shadow when previous versions of lorax overwrote it, so we ended up with two conflicting entries for "root". Instead: - keep existing /etc/shadow and /etc/passwd contents - add new entries for "install" user - remove password from existing "root" entry in /etc/shadow Also, we don't need to create the 'sshd' user, because the openssh-server %post script does that for us.
This commit is contained in:
parent
0fed4e33c2
commit
3dde9f6316
@ -67,11 +67,12 @@ install ${configdir}/sshd_config.anaconda etc/ssh
|
||||
install ${configdir}/pam.sshd etc/pam.d/sshd
|
||||
install ${configdir}/pam.sshd etc/pam.d/login
|
||||
install ${configdir}/pam.sshd etc/pam.d/remote
|
||||
append etc/passwd "sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin"
|
||||
|
||||
## set up "install" user account
|
||||
append etc/passwd "install:x:0:0:root:/root:/sbin/loader"
|
||||
append etc/shadow "root::14438:0:99999:7:::"
|
||||
append etc/shadow "install::14438:0:99999:7:::"
|
||||
chmod etc/shadow 400
|
||||
## remove root password
|
||||
replace "root:*:" "root::" etc/shadow
|
||||
|
||||
## s390-specific setup
|
||||
%if basearch in ("s390", "s390x"):
|
||||
|
Loading…
Reference in New Issue
Block a user