MAC_CHANGER sudo password

I have been following the course lectures but I always have to type sudo when accessing ifconfig. Now I’m trying to write the mac_changer code but it can’t process ifconfig command becaue it needs the password and I don’t know how to read and write password in this case. It looks like the instructor never needed to use sudo. I want to make it so that I don’t have to type sudo and be able to access everything. Do I have to change the account or the account privilege?

Which kali version are you using? Did you install the custom Kali version (https://www.stationx.net/custom-kali-linux-2020/) or the latest 2020 version?
Also, how did you install ifconfig? As from what I know in the 2020 version, it doesn’t come pre-installed with net-tools that contains ifconfig

Im using the 2020 version. Should I redownload the custom version?

Try using the custom version. Also, are you creating a new user or using the default “kali” user?

For the 2020 version I’m using the dafault “kali” user.

“kali” user has limited privilege and that’s why you have to use sudo. You can do two things here, either use sudo before executing your script or log in as root in Kali and then run the script

Will it also work if I download the custom kali and remove the 2020 version?

Yes for both the versions you have to use sudo or log in as root user. Using custom version is useful as there are many libraries not available in the normal version

thank you! it worked