Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-19-2006, 09:56 PM
|
#1
|
Member
Registered: Oct 2004
Location: USA
Distribution: Slackware, Debian, Ubuntu
Posts: 223
Rep:
|
make users change pswd on 1st login
Hi, I have set up a sftp/ssh server at home, and I would like to give access to my friends. I am the only admin, and only I can add users. However, I would like to give them the freedom to pick their passwords. Most of my friends don't know jack about UNIX, so I would like to make them change their passwords with a nice looking script, on the first login. how can I do that. I am thinking about writing a shell script, but how can I make it execute only on the first login. I am open to other solutions as well.
Thanx for any help
|
|
|
01-19-2006, 10:46 PM
|
#2
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
As far as shell access (SSH) goes, once you create the account, run:
Where username is the new user you created. The existing password is now expired. When they log in using SSH, they'll enter the password you gave them and go through the following:
Code:
login as: oracle
oracle@xx.xxx.xx.xx's password:
Last login: Fri Jan 20 14:35:47 2006 from xx.xxx.xx.xx
Linux 2.6.13.
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for oracle
Old password:
Enter the new password (minimum of 5, maximum of 127 characters)
Please use a combination of upper and lower case letters and numbers.
New password:
Re-enter new password:
It's not pretty (and entering the old password twice is a pain), but it saves you some mucking around.
|
|
|
01-20-2006, 12:49 AM
|
#3
|
Member
Registered: Oct 2004
Location: USA
Distribution: Slackware, Debian, Ubuntu
Posts: 223
Original Poster
Rep:
|
Thanks a lot,
That's exactly what I needed!
Ivan
|
|
|
01-20-2006, 04:18 AM
|
#4
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
No problem 
|
|
|
All times are GMT -5. The time now is 02:33 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|