SUA/SFU dropbear minor annoyances..

Well I just deployed a Windows server to run some ancient ASP stuff, and it just turned out that the new direction is going to be php & unix… Since the machine is now in a different nation changes will be… difficult.

So for now I thought I’d install the SFU package and just connect in thru that and set it up… Except SFU/SUA is all telnet remotely… Which is bad. However dropbear to the rescue has ‘fixed’ it, now I can ssh.

There is really one two tweaks, the first one requires you to change the utmp stuff to utmpx.. It’s really easy, just add the x to the structures!

The ‘challenge’ was to authenticate passwords. You cannot verify passwords the old way, but after a lot of digging around I found this page:

http://technet.microsoft.com/en-us/library/bb463206.aspx

“Porting applications in C” ..

And for anyone that cares, here is the part for svr-authpasswd.c

/* the first bytes of passwdcrypt are the salt */
// testcrypt = crypt((char*)password, passwdcrypt);
// m_burn(password, passwordlen);
// m_free(password);

//This changes
//if (strcmp(testcrypt, passwdcrypt) == 0)
if(setuser(ses.authstate.pw_name,password,SU_CHECK)==0)

Yep, that’s it, and now gen your keys, and away you go!

Author: neozeed

I live in SE Asia, doing generic work, enjoying my life & family

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.