26 lines
665 B
Bash
26 lines
665 B
Bash
#!/bin/sh
|
|
if [ ! -f /var/lib/ymp/sysconf/shadow/postinstall.done ] ; then
|
|
for app in su chage chsh expiry ; do
|
|
chmod u+s /usr/bin/$app
|
|
done
|
|
touch /etc/group
|
|
date > /var/lib/ymp/sysconf/shadow/postinstall.done
|
|
fi
|
|
if ! grep "^users:" /etc/group >/dev/null ; then
|
|
echo "users:x:100:" >> /etc/group
|
|
fi
|
|
if ! grep "^wheel:" /etc/group >/dev/null ; then
|
|
echo "wheel:x:10:root" >> /etc/group
|
|
fi
|
|
if ! grep "^root:" /etc/group >/dev/null ; then
|
|
echo "root:x:0:root" >> /etc/group
|
|
fi
|
|
|
|
if [ ! -f /etc/shadow ] ; then
|
|
echo "root:*::0:::::" > /etc/shadow
|
|
chmod 600 /etc/shadow
|
|
chown root /etc/shadow
|
|
chgrp root /etc/shadow
|
|
fi
|
|
|