0

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?

jaypabs
  • 773
  • 2
  • 9
  • 15

1 Answers1

4

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

MLu
  • 23,798
  • 5
  • 54
  • 81
  • 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