These scripts work well for the author, but may not on your system. You may need to modify them to fulfill your requirements.
Download and Installation
/usr/bin/yum install --enablerepo=smecontribs smeserver-dirty-tools
dt-rename-account OLD_ACCCOUNT NEW_ACCOUNT
The script does the following:
- checks the new account name for maximum length and bad characters
- checks whether the new account already exists
- renames the account record key in the accounts database
- renames all occurrences of account name in pseudonym und group records in the accounts database
- renames the account in /etc/samba/smbpasswd
- renames the account in /etc/passwd and /etc/shadow
- renames the home directory path in /etc/passwd
- renames the account in /etc/group
- renames the home directory
dt-passwords-sync [--dry-run] --all SOURCESERVER
dt-passwords-sync [--dry-run] SOURCESERVER ACCOUNT
dt-passwords-sync [--dry-run] --ibays --all SOURCESERVER
dt-passwords-sync [--dry-run] --ibays SOURCESERVER IBAY
The script sets the encrypted password string in /etc/shadow and the NT-Hash and Lanman-Hash in /etc/samba/smbpasswd with the values retrieved from server SOURCESERVER. For ibays only the encrypted password string in /etc/shadow is set. The 'PasswordSet' property of the account/ibay record is set to 'no', if the encrypted password string start with two exclamation marks.
dt-data-sync [--dry-run] [--compress] SOURCESERVER ACCOUNT
dt-data-sync [--dry-run] [--compress] --ibay SOURCESERVER IBAY
Synchronizes the data of ACCOUNT or IBAY with the SOURCESERVER.
Path synchronized for accounts: /home/e-smith/files/users/ACCOUNT
Path synchronized for ibays: /home/e-smith/files/ibays/IBAY
dt-data-sync does not create or delete accounts or ibays.
dt-data-copy [--dry-run] [--compress] SOURCESERVER ACCOUNT
dt-data-copy [--dry-run] [--compress] --ibay SOURCESERVER IBAY
Similar to dt-data-sync, but does not delete files on the destination and does not overwrites files if their modification times are newer than the source files.
dt-unlock-account / dt-lock-account
dt-lock-account operates identically as the 'Lock account' link in the server-manager. dt-unlock-account is the reverse of the lock account command. It re-enables the latest set user password.
dt-send-key [--port=PORT] REMOTEHOST
dt-send-key [--revoke] [--port=PORT] REMOTEHOST
Sends the public DSA key to REMOTEHOST.
Sometimes Dovecot index files are corrupted after a restore. It is safe to delete them all. Dovecot will rebuild them when the mailbox is accessed.
dt-pw-generate [--number=C][--length=N] [--mixed-case] [--add-consonants]
Generates an easy to remember password that passes the SME password strength check and prints it on STDOUT. Defaults: --number=1 --length=8
This removes the installed Dirty-Tools package.
/usr/bin/yum erase smeserver-dirty-tools
Please raise bugs under the SME-Contribs section in bugzilla and select the smeserver-dirty-tools component or use this link
|11621||SME Contribs||10.0rc||IN_PROGRESS||Initial Import to SME10 tree [smeserver-dirty-tools]|
Only released version in smecontrib are listed here.