mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 01:01:06 +00:00
Use the new pw(8) '-R' option to create the users/groups.
MFC after: 1 week X-MFC-after: r283961 Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
a5b912ff43
commit
b07d911f39
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=283963
|
@ -80,14 +80,13 @@ arm_create_disk() {
|
|||
arm_create_user() {
|
||||
# Create a default user account 'freebsd' with the password 'freebsd',
|
||||
# and set the default password for the 'root' user to 'root'.
|
||||
chroot ${CHROOTDIR} /usr/sbin/pw -V ${DESTDIR}/etc \
|
||||
chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \
|
||||
groupadd freebsd -g 1001
|
||||
chroot ${CHROOTDIR} /usr/sbin/pw -V ${DESTDIR}/etc \
|
||||
chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \
|
||||
useradd freebsd \
|
||||
-m -M 0755 -w yes -n freebsd -u 1001 -g 1001 -G 0 \
|
||||
-c 'FreeBSD User' -d '/home/freebsd' -s '/bin/csh' \
|
||||
-b "${DESTDIR}/home"
|
||||
chroot ${CHROOTDIR} /usr/sbin/pw -V ${DESTDIR}/etc \
|
||||
-c 'FreeBSD User' -d '/home/freebsd' -s '/bin/csh'
|
||||
chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \
|
||||
usermod root -w yes
|
||||
|
||||
return 0
|
||||
|
|
Loading…
Reference in a new issue