Developers Documentation

×

Warning

301 error for file:https://clearos.com/dokuwiki2/lib/exe/css.php?t=dokuwiki&tseed=82873f9c9a1f5784b951644363f20ef8

User Tools

Site Tools


Adding a User Account from the Command Line

This Howto describes the procedure for adding a user account outside of the ClearOS LDAP system (i.e. in /etc/passwd). The two most common reasons for this requirement:

  • You need an account for running a third party service (daemon)
  • You just want to have an old school user account outside of LDAP

Adding a System Account

If you are installing a third party service (daemon) on your ClearOS system, it is common practice to run the service under a unique account. Fortunately, most Linux distributions reserve a range of user IDs for this purpose. Unfortunately, this range differs across Linux distributions. In ClearOS, user IDs from 1 to 499 are reserved for system accounts. By specifying the -r flag in useradd, the account will automatically be created as a system account. For example:

useradd -r zimbra

You may also want to specify a different home directory with these accounts:

useradd -r -d /var/lib/zimbra zimbra

Don't worry about the following warning message if you see it:

useradd: unknown GID 100

Adding an Old School User Account

In some circumstances, you may want to add an old school user account that will not overlap with LDAP. This is common practice in a ClearOS developer environment, especially if you are developing for the LDAP system! Fortunately, a range of user IDs have been reserved for this purpose. In ClearOS, user IDs from 500 to 999 can be used for an old school user account. By specifying the user ID with the -u flag, you can create an account in this old school range:

useradd -u 500 oldschool

After creating the account, you can set the password with:

passwd oldschool

On ClarkConnect systems that have been upgraded from version 4.x, you should run the following first: rm -f /etc/system/pre5x

content/en_us/kb_howtos_adding_a_user_account_from_the_command_line.txt · Last modified: 2015/02/11 09:43 (external edit)

https://clearos.com/dokuwiki2/lib/exe/indexer.php?id=content%3Aen_us%3Akb_howtos_adding_a_user_account_from_the_command_line&1710841649