Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried to install an OpenVPN access server in Centos 6 on a linode VPS.

The installation error occours when adding the user "openvpn". However, the installation is okay for my ubuntu 11.10 distro in another VPS.

The error message is

"useradd: canot open /etc/passwd"

The detail of My "/etc/passwd" file:

"-rw-r--r-- 1 root root 1194 Oct  9 00:33 /etc/passwd"

So how can I add the user "openvpn" to setup the VPN service?

Thanks.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I have found out the solution.

The attributes of "/etc/passwd" and "/etc/shadow" are both set hiden in Centos of linode.

Change the attributes of two file by the following two commands:

chattr -ai /etc/passwd
chattr -ai /etc/shadow

Then I can add user by typing:

useradd -s /sbin/nologin openvpn
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.