pop

Use the pop command to retrieve a previously-stored context of bindings and selected objects from the top of the context stack. This command replaces the current ADEdit context with the retrieved context. Popping a context from the context stack removes the context from the stack.

This command is useful for Tcl scripts that use subroutines. A push can save the context before it’s altered in the subroutine; a pop can return the saved context when the subroutine returns.

Zone Type

Not applicable

Syntax

pop

Abbreviation

None.

Options

This command takes no options.

Arguments

This command takes no arguments.

Return Value

This command returns nothing if it runs successfully. If the stack is empty, it returns a message stating so.

Examples

pop

This example retrieves the context from the top of the context stack and uses it as the current ADEdit context.

The following commands perform actions related to this command:

  • show returns the current context of ADEdit, including its bound domains and its currently selected objects.
  • push saves the current ADEdit context to the ADEdit context stack.

principal_from_sid

Use the principal_from_sid command look up the security principal for a specified security identifier (SID) in Active Directory. If the security identifier is found, the command returns the Active Directory name of the principal.

Zone Type

Not applicable

Syntax

principal_from_sid [-upn] sid

Abbreviation

pfs

Options

This command takes the following option:

Option Description
-upn Returns the user names in user principal name (UPN) format, not the default sAMAccount@domain format.

Arguments

This command takes the following argument:

Argument Type Description
sid string Required. Specifies the security identifier of an Active Directory security principal.

Return Value

This command returns the Active Directory name of the principal if it finds a principal. If it does not find a principal, it returns a message stating so.

Examples

principal_from_sid S-1-5-21-2076040321-3326545908-468068287-1159

This example returns the principal name: oracle_machines@acme.com

The following commands perform actions related to this command:

  • principal_to_dn searches Active Directory for a user principal name (UPN) and, if found, returns the corresponding distinguished name (DN).
  • dn_to_principal searches Active Directory for a distinguished name (DN) and, if found, returns the corresponding user principal name (UPN).

principal_to_dn

Use the principal_to_dn command to search Active Directory for the specified user principal name (UPN) of a security principal (user, machine, or group). If a security principal is found for the specified UPN, the command returns the distinguished name (DN) of the principal.

Zone Type

Not applicable

Syntax

principal_to_dn principal_upn

Abbreviation

ptd

Options

This command takes no options.

Arguments

This command takes the following argument:

Argument Type Description
principal_upn string Required. Specifies the user principal name (UPN) of a security principal.

Return Value

This command returns a distinguished name. If the command doesn’t find the specified security principal in Active Directory, it presents a message that it didn’t find the principal.

Examples

principal_to_dn brenda.butler@acme.com

This example returns the distinguished name for the specified UPN:

cn=brenda butler,cn=users,dc=acme,dc=com

The following commands perform actions related to this command:

  • dn_from_domain converts a domain’s dotted name to a distinguished name.
  • get_parent_dn returns the parent of an LDAP path as a distinguished name.
  • get_rdn returns the relative distinguished name of an LDAP path.
  • dn_to_principal searches Active Directory for a distinguished name, and, if found, returns the corresponding user principal name (UPN).
  • principal_from_sid searches Active Directory for a security identifier and returns the security principal associated with the security identifier.

principal_to_id

Use the principal_to_id command to search Active Directory for the specified user principal name (UPN) of a user or group security principal. If a security principal is found for the specified UPN, the command returns the numeric identifier for the principal.

Zone Type

Not applicable

Syntax

principal_to_id [-apple] upn

Abbreviation

pti

Options

This command takes the following option:

Option Description
-apple Specifies that you want to use the Apple scheme for generating the UID or GID for the specified user or group principal. If you don’t specify this option, the UID or GID returned is based on the Delinea Auto Zone scheme.

Arguments

This command takes the following argument:

Argument Type Description
upn string Required. Specifies the user principal name (UPN) of a user or group security principal.

Return Value

This command returns a unique UID or GID based on either the Apple methodology or the Delinea Auto Zone methodology for generating numeric identifiers. If the user or group principal is not found in Active Directory, the command returns an error message indicating that it didn’t find the principal.

Examples

principal_to_id -apple brenda.butler@acme.com

This example returns the UID for the specified user generated using the Apple scheme:

1983765448

The following commands perform actions related to this command:

  • guid_to_id accepts a globally unique identifier (GUID) for a user or group and returns a UID or GID generated using the Apple scheme.
  • principal_from_sid searches Active Directory for a security identifier and returns the security principal associated with the security identifier.

push

Use the push command to save the current ADEdit context—its bindings and selected objects in memory—to a context stack. This command leaves the current context in place, so all current bindings and selected objects remain in effect in ADEdit after the push.

This command is useful for Tcl scripts that use subroutines. You can use the push command to save the context before it’s altered in the subroutine. You can then use the pop command to retrieve the saved context when the subroutine returns.

Zone Type

Not applicable

Syntax

push

Abbreviation

None.

Options

This command takes no options.

Arguments

This command takes no arguments.

Return Value

This command returns nothing.

Examples

push

The example saves the current ADEdit context.

The following commands perform actions related to this command:

  • show returns the current context of ADEdit, including its bound domains and currently selected objects.
  • pop restores the context from the top of the ADEdit context stack to ADEdit.

quit

Use the quit command to quit ADEdit and return to the shell from which ADEdit was launched. You can also end an interactive ADEdit session by pressing Ctrl-D or entering exit.

Note:If you enter the exit command, understand that it will terminate the session immediately without performing a commit operation.

Zone Type

Not applicable

Syntax

quit

Abbreviation

q

Options

This command takes no options.

Arguments

This command takes no arguments.

Return Value

This command returns nothing.

Examples

quit

This example ends an ADEdit session.

None.

remove_command_from_role

Use theremove_command_from_rolecommand to remove a UNIX command from the currently selected role stored in memory.

Theremove_command_from_rolecommand does not change the role as it is stored in Active Directory. You must save the role before the removed command takes effect in Active Directory. If you select another role or quit ADEdit before saving the role, any UNIX commands you have removed since the last save won’t take effect.

You can only use theremove_command_from_rolecommand if the currently selected zone is a classic4 or hierarchical zone. The command does not work in other types of zones.

Zone Type

Classic and hierarchical

Syntax

remove_command_from_role command[/zonename]

Abbreviation

rcfr

Options

This command takes no options.

Arguments

This command takes the following argument:

Argument Type Description
command[/zonename] string Required. Specifies the name of a UNIX command to remove from the currently selected role. If the UNIX command that you want to remove is defined in the current zone, the zonename argument is optional. If the UNIX command right is defined in a zone other than the currently selected zone, the zonename argument is required to identify the specific command to remove.

Return Value

This command returns nothing if it runs successfully.

Examples

remove_command_from_role basicshell/global

This example removes the UNIX command named basicshell, which is defined in the global zone, from the currently selected role.

Before you use this command, you must have a currently selected role stored in memory. The following commands enable you to view and select the role to work with:

  • get_roles returns a Tcl list of roles in the current zone.
  • list_roles lists to stdout the roles in the current zone.
  • new_role creates a new role and stores it in memory.
  • select_role retrieves a role from Active Directory and stores it in memory.

After you have a role stored in memory, you can use the following commands to work with that role:

  • add_command_to_roleadds a UNIX command to the current role.
  • add_pamapp_to_role adds a PAM application to the current role. 'delete_role" deletes the selected role from Active Directory and from memory.
  • get_role_apps returns a Tcl list of the PAM applications associated with the current role.
  • get_role_commands returns a Tcl list of the UNIX commands associated with the current role.
  • list_role_rights returns a list of all UNIX commands and PAM applications associated with the current role.
  • remove_pamapp_from_role removes a PAM application from the current role.
  • save_role saves the selected role with its current settings to Active Directory.
  • set_role_field sets a field value in the current role.