sysidcfg 文件的所有 js2ai 转换将生成以下警告:
sysidcfg:line #:WARNING: Oracle Solaris 11 uses roles instead of root user. An admin user with root role privileges will need to be defined in order to access the system in multi-user mode. The necessary xml structures have been added to sc_profile.xml as a comment. Edit sc_profile.xml to perform the necessary modifications to define the admin user.
此警告与 js2ai 命令无法仅通过 root_passwd 关键字生成必需数据结构有关。如果您的 sysidcfg 文件中包含了 root_passwd 关键字,则 js2ai 将生成如下所示的 system/config-user 结构:
<service name="system/config-user" type="service" version="1"> <instance enabled="true" name="default"> <!-- Configures user account as follows: * User account name 'jack' * password 'jack' * GID 10 * UID 101 * root role * bash shell --> <!-- <property_group name="user_account" type="application"> <propval name="login" type="astring" value="jack"/> <propval name="password" type="astring" value="9Nd/cwBcNWFZg"/> <propval name="description" type="astring" value="default_user"/> <propval name="shell" type="astring" value="/usr/bin/bash"/> <propval name="gid" type="astring" value="10"/> <propval name="uid" type="astring" value="101"/> <propval name="type" type="astring" value="normal"/> <propval name="roles" type="astring" value="root"/> <propval name="profiles" type="astring" value="System Administrator"/> <propval name="sudoers" type="astring" value="ALL=(ALL) ALL"/> </property_group> --> <property_group name="root_account" type="application"> <propval name="login" type="astring" value="root"/> <propval name="password" type="astring" value="{your_root_passwd}"/> <propval name="type" type="astring" value="role"/> </property_group> </instance> </service>
在 XML 中,注释以 <!-- 开头。要定义支持 Oracle Solaris 11 所需的用户,请删除 user_account 属性组结构周围的 XML 注释标记。然后,修改 user_account 属性结构以创建将具有 root 角色特权的用户。如果未指定 root_password 关键字,则注释掉 root_account 属性组结构。