LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-04-2014, 03:05 AM   #1
cli
Member
 
Registered: Apr 2013
Distribution: RedHat, Cent, Ubuntu
Posts: 80

Rep: Reputation: Disabled
how to change password


Hi All,
We have a sftp server, and both ftp and sftp is working fine. All sftp user's login shell is set to /sbin/nologin by which they can login only through ftp clients/commands(sftp, lftp, filezilla & browsers etc) to only their home directory. Now if we implement password aging poicy to the sftp users then will they be able to reset their password themself during before their password expiry?
For that we don't want to change the user's login shell to /bin/sh or /bin/bash to achieve the same with "passwd username" command instead is it possible to change the system user's password with any perl, python or php scripts. If yes I am requesting to provide the links to download such scripts if any.

Last edited by cli; 10-04-2014 at 03:08 AM.
 
Old 10-04-2014, 09:39 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,527

Rep: Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439
if a user is not allowed to login, he/she will not be able to change his/her own password. Are those users local to that sftp server?
 
1 members found this post helpful.
Old 10-04-2014, 09:54 AM   #3
cli
Member
 
Registered: Apr 2013
Distribution: RedHat, Cent, Ubuntu
Posts: 80

Original Poster
Rep: Reputation: Disabled
Yes, all users are system(/etc/passwd) users and all can login only with browser/ftp/sftp clients but not through ssh. So it is much appreciated to introduce such scripts which can change the password via browser to exectute "passwd username" command or similar(chpasswd etc) command.
 
Old 10-07-2014, 11:34 AM   #4
cli
Member
 
Registered: Apr 2013
Distribution: RedHat, Cent, Ubuntu
Posts: 80

Original Poster
Rep: Reputation: Disabled
Can anybody please help?
 
Old 10-07-2014, 12:50 PM   #5
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,527

Rep: Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439
just again, only logged in users can modify password. Therefore you need to allow them to login (either with ssh or ??) to be able to execute the command passwd. The other solution could be to do it as root. But giving root access to the normal users is not safe. Executing such commands via browser is unsafe again, and not recommended.
I would suggest you to use global accounts ...
 
1 members found this post helpful.
Old 10-09-2014, 11:07 AM   #6
cli
Member
 
Registered: Apr 2013
Distribution: RedHat, Cent, Ubuntu
Posts: 80

Original Poster
Rep: Reputation: Disabled
Ok, Thanks for the clarification.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu 11.04 encrypted LVM password not working after user login password change prateekm21 Linux - Security 0 10-29-2011 02:20 PM
Change my root password in Debian Linux if I have the current password? panseluta Linux - Newbie 2 12-28-2008 03:02 AM
Locking out a user when password expires, but allowing them to change their password kaplan71 Linux - Security 5 06-27-2008 08:12 PM
How can I change e-mail password(or linux account password) with php in website?? yusuf Programming 1 05-28-2004 10:39 AM


All times are GMT -5. The time now is 10:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration