2

I have a Linux web server, and I've created a user (in/etc/passwd) for a web designer. I pre-set her password and she uses the sftp uploading capability of her web design software to upload content. This works, but I don't like the fact that there is no way for her to change her password on her own. The web design software (Dreamweaver) does not seem to provide this capability. What's the easiest way for me to provide this?

JoelFan
  • 2,165
  • 5
  • 24
  • 30

2 Answers2

1

Allow ssh connection and change login shell to "/usr/bin/passwd". Then login to ssh:

$ ssh servername
Last login: Sun Feb 20 12:37:33 2011 from 10.0.2.2
Changing password for ooshro.
(current) UNIX password: 
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Connection to localhost closed.
ooshro
  • 10,874
  • 1
  • 31
  • 31
0

Workaround (not bullet-proof, but working for casual usage) for disabling ssh, and allowing sftp is to put passwd to user profile; edit file ~/.profile (not yours, that user only), add line

/usr/bin/passwd
exit 0

to the end of the file.

It's possible to circumvent that, but if your web developer is not really malicious, it shouldn't be a problem.

Then when web developer connects using ssh (for example PuTTY for Windows), there is prompt for old password and then two prompts for new passwod:

Linux chaos 2.6.26-2-xen-686 #1 SMP Wed Aug 19 08:47:57 UTC 2009 i686
Last login: never
Changing password for tmpuser.
(current) UNIX password: 
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Connection to server1 closed.
Olli
  • 768
  • 6
  • 16