Skip to content

Instantly share code, notes, and snippets.

@ailtonbsj
Created June 21, 2017 02:11
Show Gist options
  • Save ailtonbsj/74c88ced6280b9cd82d3e099a947def9 to your computer and use it in GitHub Desktop.
Save ailtonbsj/74c88ced6280b9cd82d3e099a947def9 to your computer and use it in GitHub Desktop.
Removendo “freeze” do LE5
#!/bin/bash
# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root"
exit 1
fi
awk -F':' '{ print $1}' /etc/passwd | grep aluno > usrs
cat usrs | while read line; do
userdel -r $line
done
sed -i 's/allow-guest=true/allow-guest=false/g' \
/etc/lightdm/lightdm.conf
useradd -G professor -d /home/aluno Aluno
passwd -d Aluno
cp -R /home/professor /home/aluno
chown -R Aluno.professor /home/aluno
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment