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

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?

share|improve this question

2 Answers 2

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.
share|improve this answer
1  
By doing that you also disable sftp. –  Olli Feb 20 '11 at 16:20
    
Also, you can give parameters to passwd over ssh, which is not really big problem. –  Olli Feb 20 '11 at 16:21

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.
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.