hmngwy / weblog.sh

Blog from the Command Line
https://weblog.sh/
GNU General Public License v3.0
141 stars 8 forks source link

How to change password? #15

Closed franciscod closed 8 years ago

franciscod commented 8 years ago

Hey, nice project!

Is there some way of changing passwords? I didn't see any.

Thanks!

franciscod commented 8 years ago

I just skimmed the source code and saw a ssh command aptly called password that changes the password:

ssh USER@weblog.sh -p 2222 password NEWPASSWORD

Would it be better if it was interactive as in the registration process?

hmngwy commented 8 years ago

Yup that command should work. It'll be on some documentation later.

Yes, it would be better if it was interactive so the password won't go into your command history, though you can always just:

read -s password
ssh USER@weblog.sh -p 2222 password $password

Careful though, you don't want to get locked out.

Edit: make sure $password is not blank, that may lock you out.

hmngwy commented 8 years ago

I realized that the password update can't have an interactive UI, it can't forward the user to a shell/curses interface from a command execution e.g. password.

Reserving a section/window to update the password in the main shell, i.e. ssh user@weblog.sh is possible, but not in the near future.


I will keep this issue open until I have added password update documentation somewhere in the site.

franciscod commented 8 years ago

awesome, thanks!

franciscod commented 8 years ago

thanks!