Security
cancel
Showing results for 
Search instead for 
Did you mean: 

Enable/Disable Accounts at the CLI

Heathe Kyle Yeakley
Occasional Contributor

Enable/Disable Accounts at the CLI

Hello, I have a question concerning re-enabling an account that has been disabled by the operating system.

If a user becomes disabled for whatever reason, the only way I know to re-enable their account is to either:
* go into dxaccounts
* find the icon that represents their account
* select it
* choose enable
* use the calendar that pops up to select for how long the account is to remain active before re-expiring.

- OR -

* edauth
* edit the cryptic edauth database to delete the fields that have put the account in a disabled state.

My question: Is there not a command line utility where I can just type to re-enable a disabled account? I know you can lock/unlock an account with usermod -x administrative_lock_applied=[0|1]. But is there no option to enable/disable an account in a similarly simple fashion?

Thanks.
1 REPLY
Ivan Ferreira
Honored Contributor

Re: Enable/Disable Accounts at the CLI

>> But is there no option to enable/disable an account in a similarly simple fashion?

I don't understand your question, the way to enable/disable accounts from CLI is the usermod command, and it looks to me that is not too complex. Just create a scrit like this:

disable_user.sh:
# Usage: disable_user.sh
#!/bin/ksh

/usr/sbin/usermod -x administrative_lock_applied=0 $1
/usr/sbin/usermod -x grace_limit=1 $1
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?