Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have the following value under /etc/passwd file:

web3:x:5006:5006::/var/www/clients/client2/web3:/bin/false

Now, the correct value should be:

web3:x:5006:5006::/var/www/clients/client1/web3:/bin/false

That is, client1 and not client2.

I know that it's not advisable to edit the passwd file directly using vi or other text editor. I learned that it should be edited using this command vipw -s. But when I run vipw -s, I cannot find this line /var/www/clients/client1/web3:/bin/false. What I can see is this web3:!:15869:0:99999:7:::.

So how can I change the value from client2 to client1?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Try: usermod -d /var/www/clients/client1/web3 web3 or just vipw without -s.

share|improve this answer
    
Explanatory hint: The -s option for vipw changes the shadow file. This doesn't contain the home dir informations. –  Sven Jun 27 '13 at 10:49

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.