3

I have customized Ubuntu using OEM install but I would like to customize the user that is created when the end user creates an account. The user by default is an administrator but I would like them to only be a standard user. Is there a way to achieve this?

  • You mean there would Not be an administrator account that can manage the system? – xangua Jul 25 '15 at 20:17
  • I would like to have an administrative user account (I have already created it on the OEM image). But to my understanding, when you prepare the system it will then ask for a username and password to create upon reboot and then that creates an admin account. I would like that created account to be a standard account, not administrative. – Lorenzo Lewis Jul 25 '15 at 20:56
0

I believe oem-config just resets the debconf values for a couple of modules, the interesting one here being d-i passwd, which creates a user account during installation. Since this might be the only account which can login (the root account might be disabled), d-i passwd automatically adds the account to the sudo group, and there isn't an option to override this.

It does look like oem-config provides a late-command key which gets ran at the very end of the process, so I believe you could use that to remove any/all users from the sudo group. I haven't tried this myself (I use preseed/kickseed for all my setup), but assuming it works the same as the preseed late_command, you can add a single (logical) line of shell code to be executed. Something like this ran from the terminal before reboot should do the trick:

echo "set oem-config/late-command sed -i '/^(sudo:x:[0-9]+:).*$/\1/' /etc/group" | debconf-communicate

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.