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!

This entry was posted in dropbear, sfu, sua, windows vista by neozeed. Bookmark the permalink.
avatar

About neozeed

What is there to tell? I've loved UNIX like things since I was first exposed to QNX in highschool (we had the Unisys ICONS!), and spent the better time of my teenage years trying to get my own UNIX... I should have bought Coherent in retrospect.. Anyways latched onto Linux in 1992, and then got some old BSD admin books and have been hooked on the VAX BSD & other big/ancient things since...!

Leave a Reply

Your email address will not be published.

Notify me of followup comments via e-mail. You can also subscribe without commenting.