changing user name causes Calls to require password to make and receive calls
I'm not sure if this is a Calls issue or general OS issue.
If I change the user name from "purism" by running the following script as sudo, after the phone restarts, phone calls cannot be placed or received without entering the user's password in an 'Authentication Required' dialog box that pops up. If a phone call comes in when the phone screen is locked, the authentication dialog is inaccessible behind the calls window and lockscreen. This renders the phone unusable until rebooted.
I cannot figure out what change causes this issue, it all looks correct to me, and the 'grep' command in the script carefully avoids changing ~/.config/dconf/user because I initially thought that was the problem. But apparently not.
Script:
#!/bin/bash
printf "\nType the current username:\n"
read old
printf "\nType the desired username:\n"
read new
ohp="home/$old"
nhp="home/$new"
printf "\nChanging username\n"
for file in group gshadow passwd shadow subgid subuid
do
sed -i "s/$old/$new/g" /etc/$file*
done
mv /$ohp /$nhp
printf "\nAdjusting paths in home directory\n"
grep -rslI --exclude-dir="\.dconf" "$ohp" /$nhp | xargs sed -i "s+$ohp+$nhp+g"
echo
chfn $new
sync
reboot
Edit: I should also mention that this script works fine in mobian.