Search Results

Search found 2 results on 1 pages for 'hrk'.

Page 1/1 | 1 

  • Machine account authentication on Radius server

    - by O.Shevchenko
    My workstation is under Linux. I have an Active Directory domain controller + Radius server on Windows 2008. I can verify user account 'radius-01' using 'radtest' tool: $ radtest -t pap radius-01 password123 195.234.133.32 1812 password123 Sending Access-Request of id 98 to 195.234.73.2 port 1812 User-Name = "radius-01" User-Password = "password123" NAS-IP-Address = 127.0.1.1 NAS-Port = 1812 rad_recv: Access-Accept packet from host 195.234.133.32 port 1812, id=98, length=84 Framed-MTU = 1344 Framed-Protocol = PPP Service-Type = Framed-User Class = 0x537004f00000013700010200ac1c0... I have joined my Linux PC to Active Directory domain ARB-HRK using Samba: [root@shev-arb]# net ads testjoin Join is OK I can dump machine password: [root@shev-arb]# tdbdump /var/lib/samba/private/secrets.tdb { key(34) = "SECRETS/MACHINE_PASSWORD/ARB-HRK" data(15) = "yGgXJsquRnpT0g\00" } How can i authenticate my machine account on Radius server? Do anybody know any tools for this, like: radtest shev-arb$ yGgXJsquRnpT0g 195.234.133.32 1812 password123 (this command fails)

    Read the article

  • Update UI in the main activity through handler in a thread (Android)

    - by Hrk
    Hello, I try to make several connection in a class and update the multiple progressbar in the main screen. But I've got the following error trying to use thread in android : Code: 05-06 13:13:11.092: ERROR/ConnectionManager(22854): ERROR:Can't create handler inside thread that has not called Looper.prepare() Here is a small part of my code in the main Activity public class Act_Main extends ListActivity { private ConnectionManager cm; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Set up the window layout requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.main); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title); } public void startConnection() { //open DB connection db = new DBAdapter(getApplicationContext()); db.open(); cm = new ConnectionManager(handler, db); showDialog(DIALOG_PROGRESS_LOGIN); } @Override public void onStart() { super.onStart(); startConnection(); } protected Dialog onCreateDialog(int id) { switch (id) { case DIALOG_PROGRESS_LOGIN: progressDialog = new ProgressDialog(Act_Main.this); progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setMessage("Connecting.\nPlease wait..."); progressThreadLogin = new ProgressThreadLogin(); progressThreadLogin.start(); return progressDialog; case DIALOG_PROGRESS_NETWORK: [b]progressDialog = new ProgressDialog(Act_Main.this);[/b] progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setMessage("Loading entire network.\nPlease wait..."); progressThreadNetwork = new ProgressThreadNetwork(); progressThreadNetwork.start(); return progressDialog; default: return null; } } // Define the Handler that receives messages from the thread and update the progress final Handler handler = new Handler() { public void handleMessage(Message msg) { int total = msg.getData().getInt("total"); int step = msg.getData().getInt("step"); Log.d(TAG, "handleMessage:PROCESSBAR:"+total); progressDialog.setProgress(total); if (total >= 100) { switch (step) { case UPDATE_NETWORK: dismissDialog(DIALOG_PROGRESS_LOGIN); showDialog(DIALOG_PROGRESS_NETWORK); cm.getNetwork(); break; .... default: break; } } } }; private class ProgressThreadLogin extends Thread { ProgressThreadLogin() { } public void run() { cm.login(); } } private class ProgressThreadNetwork extends Thread { ProgressThreadNetwork() { } public void run() { cm.getNetwork(); } } } And my connectionManager class: public class ConnectionManager { public ConnectionManager(Handler handler, DBAdapter db) { this.handler = handler; this.db = db; } public void updateProgressBar(int step, int value) { if (value == 0) total = total+1; else total = value ; Message msg = handler.obtainMessage(); Bundle b = new Bundle(); b.putInt("total", total); b.putInt("step", step); msg.setData(b); handler.handleMessage(msg); } public void login() { //DO MY LOGIN TASK updateProgressBar(Act_Main.UPDATE_NETWORK, 100); } } The crash errors occurs on the first line of "case DIALOG_PROGRESS_NETWORK:". My first progressbar is hidden but the second one is not displayed. I think I've done somthing wrong using the threads and handlers but I dont' know why. I was first using handler.sendMessage in place of handler.handleMessage but when I had several task in my connectionManager, the progressbar was updated only at the end of all tasks. Thank you in advance for your help

    Read the article

1