1.简介:
poky提供的useradd
源目录中的poky/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb 配方提供了一个简单的示例,展示了如何将三个用户和组添加到两个包中。
2.边看边做
2.1.学前知识
在了解该配方文件之前,需要先了解useradd的相关参数
useradd --help
Usage: useradd [options] LOGIN
useradd -D
useradd -D [options]
Options:
--badnames do not check for bad names
-b, --base-dir BASE_DIR base directory for the home directory of the
new account
--btrfs-subvolume-home use BTRFS subvolume for home directory
-c, --comment COMMENT GECOS field of the new account
-d, --home-dir HOME_DIR 用户登录后的home目录
-D, --defaults print or change