Cannot create new virtual server

SYSTEM INFORMATION
OS type and version Ubuntu Linux 20.04.6
Webmin version 2.021
Virtualmin version 7.5
Related packages SUGGESTED

Hello
When i try to create a new virtual server i get this error:

Creating administration group tesae …
… done

Creating administration user tesae …
… failed to create administration user : useradmin::create_user failed : Failed to replace /etc/passwd with /etc/passwd.webmintmp.6002 : Operation not permitted

Fatal Error!
Failed to create virtual server : Critical feature Administration user was not properly created - Virtual server creation halted.

root@new2:~# ls -l /etc/passwd; lsattr /etc/passwd
-rw-r–r-- 1 root root 6389 Mar 30 10:49 /etc/passwd
-----a--------e----- /etc/passwd
root@new2:~#

Any ideas?

Thank you

Nevermind i solved it with:

chattr -a /etc/passwd
chattr -a /etc/shadow

Thank you

Hello @palesths ,
First I tried your commands:
chattr -a /etc/passwd
chattr -a /etc/shadow

it shows :
chattr: Operation not permitted while setting flags on /etc/passwd
chattr: Operation not permitted while setting flags on /etc/shadow

then I ran the below command (from above) and found :
root@server1:~# ls -l /etc/passwd; lsattr /etc/passwd
-rw-r–r-- 1 root root 7313 May 13 02:56 /etc/passwd
----ia--------e----- /etc/passwd

Then I ran :
root@server1:~# chattr -i /etc/shadow
root@server1:~# chattr -a /etc/shadow

root@server1:~# chattr -i /etc/passwd
root@server1:~# chattr -a /etc/passwd

but after a while i checked : /etc/passwd and /etc/passwd
it changed for some seconds but then reverse to previous state.
Eventually can not create new virtual server.
Would you please help me?
Thanks in advance.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.