menuimage

Description

Usage

Example

Options

Dependencies

License

Download

Donation

My_Other_Sites

My_Programs

Comments

timedicer-rename-user v1.0 [17 Aug 2023] by Dominic

Description

A simple way to rename or delete a user on a TimeDicer Server. This script is useful if a source machine has been reconfigured so that the default username (%USERNAME%-%USERDOMAIN%) has changed. It requires that [oldname] has a primary group also called [oldname] and a home directory at /home/[oldname], and will refuse to run otherwise.

After a warning prompt, it will rename or delete the user, the group and the user's home directory. Deleting (but not renaming) a user in this way will also irretrievably delete their /home folder - for TimeDicer, this is normally their rdiff-backup archive(s) - you have been warned!

If an Rdiffweb database is found, then sqlite3 is (installed and) used to correct or delete the corresponding entry there.

Usage

sudo ./timedicer-rename-user.sh [options] oldname [newname]

Example

sudo ./timedicer-rename-user.sh frederick-fredspc fred-freds

Options

-h show help and exit
-r only make changes to Rdiffweb database
-x to delete the user

Dependencies

apt-get awk bash deluser find fold grep groupmod sed sqlite3 stty usermod

License

Copyright © 2023 Dominic Raferd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Download timedicer-rename-user.sh

Donation

I have provided this software free gratis and for nothing. If you would like to thank me with a contribution, please let me know and I will send you a link. Thank you!

My Other Sites

My Programs

Here is a selection of some (other) programs I have written, most of which run under GNU/Linux from the command line (CLI), are freely available and can be obtained by clicking on the links. Dependencies are shown and while in most cases written and tested on an x86-based Linux server, they should run on a Raspberry Pi, and many can run under Windows using Windows Subsystem for Linux (WSL) or Cygwin. Email me if you have problems or questions, or if you think I could help with a programming requirement.

Backup Utilities

Debian/Ubuntu kernel and LVM Utilities

Miscellaneous Programs

Comments

This section is closed. If you have a question, please submit it by email, thank you.

No comments yet for '/programs/help/timedicer-rename-user.sh.php'