menuimage

Description

Usage

Example

Options

Dependencies

License

Download

My_Other_Sites

My_Programs

Comments

timedicer-rename-user v0.8 [22 Jun 2016] 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 after a further warning prompt sqlite3 is (installed and) used to correct 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 © 2017 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

My Other Sites

My Programs

Here is a selection of some (other) programs I have written, most of which run 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 for a conventional Linux server, they should run even on a Raspberry Pi, and many can run under Windows using 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

Dellmont / Three / Giffgaff / Vodafone - VoIP and Mobile Phone Account Utilities

Miscellaneous Programs

Comments

No comments yet
*Name:
Email:
Hide my email
*Text:
 
Powered by Scriptsmill Comments Script