Closed 0sma closed 4 months ago
@0sma @atheik
Hm.. I am trying to reproduce it, What is meaning "the enter/return has been pressed twice" ? You don't insert password and give enter twice ?
The issue is that no prompt to enter New password/Retype password is presented on CLI, after the ksmd.adduser is started. Those prompts are displayed after the passwords have been typed in and confirmed. I.e. the enter/return has been pressed twice.
Here's a screenshot to understand it better:
Password prompts are displayed after the pass have been entered:
The expected behaviour would be to show prompts for: New password immediately after the ksmbd.adduser starts Retype password after enter/return has been pressed
@0sma,
What terminal emulator are you using? What is TERM
and the output of stty -a
?
root@<redacted>:~# echo $TERM
xterm
root@<redacted>:~# stty -a
speed 38400 baud; rows 24; columns 126; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S;
susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc
@0sma,
Thanks. And what terminal emulator are you using? TERM
alone does not reveal it.
Reproduced this on Alpine Linux 3.20.1. The ksmbd.addshare
prompting does not work there either. Since I can't reproduce this on Arch Linux or Debian GNU/Linux, I'm guessing this is probably a musl libc thing. If so, then the prompting is probably broken on OpenWrt as well.
@atheik,
The system is an OpenWrt based router. As I'm connecting to it over SSH, the terminal emulator would be Putty/ssh client.
@0sma,
Thank you for opening this issue.
@namjaejeon,
This fixes the issue:
@atheik Thanks for your patch!, Applied it to #master now. I will release it.
@0sma It would be grateful if you could confirm that this patch fix your issue.
Thanks for a quick resolution. The patch fixes the issue.
This issue is present in ksmbd-tools version : 3.5.1
If adding a new user with: ksmbd.adduser -a user1
following is presented on CLI: [ksmbd.adduser/12789]: INFO: Prompting for password
No prompts for new/retype password are presented. These are shown after the enter/return has been pressed twice, together with additional information:
New password: Retype password: [ksmbd.adduser/12789]: INFO: Wrote '/etc/ksmbd/ksmbdpwd.db' [ksmbd.adduser/12789]: INFO: Added user 'user1' [ksmbd.adduser/12789]: ERROR: Invalid lock entry '12561' [ksmbd.adduser/12789]: INFO: Ignored lock file
In previous version (3.4.8) prompts for password have been presented correctly.