__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
#!/bin/sh
rename_user () {
usermod -l "$NEWNAME" "$FIRSTUSER"
usermod -m -d "/home/$NEWNAME" "$NEWNAME"
groupmod -n "$NEWNAME" "$FIRSTGROUP"
for file in /etc/subuid /etc/subgid; do
sed -i "s/^$FIRSTUSER:/$NEWNAME:/" "$file"
done
if [ -f /etc/sudoers.d/010_pi-nopasswd ]; then
sed -i "s/^$FIRSTUSER /$NEWNAME /" /etc/sudoers.d/010_pi-nopasswd
fi
}
if [ $# -eq 3 ]; then
FIRSTUSER="$1"
FIRSTGROUP="$1"
shift
else
FIRSTUSER="$(getent passwd 1000 | cut -d: -f1)"
FIRSTGROUP="$(getent group 1000 | cut -d: -f1)"
fi
NEWNAME=$1
NEWPASS=$2
if [ "$FIRSTUSER" != "$NEWNAME" ]; then
rename_user
fi
if [ -n "$NEWPASS" ]; then
echo "$NEWNAME:$NEWPASS" | chpasswd -e
fi
if [ -x /usr/bin/raspi-config ] && raspi-config nonint is_pi; then
HASH=$(grep Serial /proc/cpuinfo | sha256sum | cut -f1 -d' ')
for file in /etc/chromium/master_preferences /usr/share/firefox/distribution/distribution.ini; do
if [ ! -f "$file" ]; then
continue
fi
sed -i "s/UNIDENTIFIED/$HASH/g" "$file"
done
fi
/usr/bin/cancel-rename "$NEWNAME"
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| userconf | File | 1.1 KB | 0755 |
|
| userconf-service | File | 3.44 KB | 0755 |
|