Exporting and Importing Users
The following steps can be used to export users from one Zenoss system and import them into another system. The export format is a proprietary Zope format that isn't particularly useful except to import into another Zenoss system.
This approach will replace the user information in the destination system. So this is not a way to copy a set of users from one system to augment the users already in another system. The only exception to this is the special admin user. The admin user is not affected by this process.
Export
Perform the following steps on the source system that contains the user information you want to copy. These steps can only be performed as the admin user.
- Go to http://zenoss.example.com/zport/manage
- Select (with a check) acl_users
- Click the Import/Export button
- Click the Export button with default settings
This creates a $ZENHOME/var/acl_users.zexp file on the source system.
Import
Perform the following steps on the destination system on which you want to replace user information. These steps can only be performed as the admin user.
- Copy the acl_users.zexp file from the export steps into $ZENHOME/import/ on the destination system
- Go to http://zenoss/zport/manage
- Select acl_users and choose Delete
- Click the Import/Export button
- Verify that acl_users.zexp is chosen under import file name.
- Click Import
Scripting with ZenDMD
The following zendmd commands can be used instead of the steps outlined above. These steps create and use the acl_users.zexp file in exactly the same way as the steps above.
Export
zport.manage_exportObject('acl_users')
Import
zport._delObject('acl_users') zport.manage_importObject('acl_users.zexp') commit()