I have created a user in my Centos VPS. But with the new user I can not create, modify files in any folder (for example /var/www/
or /etc/nginx/conf.d/
), even though I have added the new user to the wheel group. (My explanation might be wrong since my knowledge of linux is very low.)
How can I configure this user to work as if it were root?
First I created the user
$ useradd mynewuser
$ passwd mynewuser
Then I added root privileges:
$ usermod -G wheel mynewuser
$ vi /etc/pam.d/su
# Uncommented this line
auth required pam_wheel.so use_uid
$ visudo
mynewuser ALL=(ALL) ALL