• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

htpasswd: Command not found

Beeblebrox

Aspiring Daemon

Thanks: 146
Messages: 985

#4
@pbd:
part of all Apache ports
Right, but if you don't want Apache, you should be able to install stand-alone modules of htpasswd, of which there are several.

@graudeejs: Still getting:
Code:
htpasswd.py: Command not found
and "No match" when #ls /usr/local/sbin/ht*
 

Beeblebrox

Aspiring Daemon

Thanks: 146
Messages: 985

#8
okay it's in /usr/local/bin, but
[CMD=""]/usr/local/bin># ./htpasswd.py[/CMD]
still gives
Code:
./htpasswd.py: Command not found
what the hell?
 

wblock@

Administrator
Staff member
Administrator
Moderator
Developer

Thanks: 3,607
Messages: 13,850

#9
Are you really looking for a python version of htpasswd? Then usually that means the command interpreter specified in the first line of the file (the "shebang") is missing or in the wrong place. Or maybe the wrong version, like python26 instead of python27.
 

kpa

Beastie's Twin

Thanks: 1,682
Messages: 6,084

#10
The security/py-htpasswd port installs /usr/local/bin/htpasswd with a shebang line

Code:
#!/usr/bin/python
No wonder it doesn't work :OOO, python on FreeBSD does not link /usr/bin/python to /usr/local/bin/python*.

Ask the maintainer of the port to fix it.
 

Beeblebrox

Aspiring Daemon

Thanks: 146
Messages: 985

#11
@wblock:
Are you really looking for a python version of htpasswd?
No, don't care - just looking for the minimal depends solution (instead of installing the whole Apache bundle). Can't say much about the python script in question, but since graudeejs has it working..? My file has:
Code:
#!/usr/bin/python
"""Replacement for htpasswd"""
@kpa: OK - I changed the 1st line in the script to local and it worked!
Code:
#!/usr/local/bin/python
 

graudeejs

Son of Beastie

Thanks: 686
Messages: 4,611

#12
kpa said:
The security/py-htpasswd port installs /usr/local/bin/htpasswd with a shebang line

Code:
#!/usr/bin/python
No wonder it doesn't work :OOO, python on FreeBSD does not link /usr/bin/python to /usr/local/bin/python*.

Ask the maintainer of the port to fix it.
Holly. cow... How did I miss that one...

I'll fix asap

EDIT:
submitted pr with patch
 

chessmaster

Member

Thanks: 7
Messages: 57

#13
Beeblebrox said:
@wblock:

No, don't care - just looking for the minimal depends solution (instead of installing the whole Apache bundle). Can't say much about the python script in question, but since graudeejs has it working..? My file has:
Code:
#!/usr/bin/python
"""Replacement for htpasswd"""
@kpa: OK - I changed the 1st line in the script to local and it worked!
Code:
#!/usr/local/bin/python
Hey having the same problem as you. I installed security/p5-Authen-Htpasswd, security/p5-Apache-Htpasswd, and security/py-htpasswd. Getting the
Code:
htpasswd: Command not found.
 

chessmaster

Member

Thanks: 7
Messages: 57

#16
Code:
$ htpasswd
htpasswd: not found
$ rehash
rehash: not found
$ htpasswd
htpasswd: not found
$ htpasswd.py
htpasswd.py: not found
Code:
$pkg_info p5-Apache-Htpasswd-1.8 Manage Unix crypt-style password file
p5-Authen-Htpasswd-0.171 Authen::Htpasswd - interface to read and modify Apache .htp
 

chessmaster

Member

Thanks: 7
Messages: 57

#19
Sorry, I figured out what I did wrong changed the path
Code:
#vi /usr/local/bin/htpasswd.py
to
Code:
 #!/usr/local/bin/python
Thanks to the previous user.
 
Top