Yes. First I work on medical application where my application creates some text files and access a servlet. I cant use database(to login in my application) because some over company restrictions . This password has to be the system's (user logged in ) password as per my employer. How do I access system( windows/ linux ) user's password? After the user has logged in, I want to access user's system password and set that password to my application's servlet.
have you got it?
Regards,
Jos?
hey jj,
there is no way to get users password in Linux unless you have the authority to read the shadow file(root privilege) and you use brute-force to get the password...
but it seems to me that you want your application to be accessed by some autherised people only from some restricted computers with login and password for users...
if this is the case i can suggest a way around it...
1. write your servlet in such a way that it will accept requests only from a list of IPs ( use ServletRequest.getRemoteAddr() ) and only from a list of users
2. access system username ( use System.getProperty() ) in your client-side application and use your application to make request with the system username that you got
hope this will help you...
regards
i_virus
> there is no way to get users password in Linux unless
> you have the authority to read the shadow file(root
> privilege) and you use brute-force to get the
> password...
The shadow file contains a hash of the password, not the password. The password is not stored anywhere on a unix/linux system. If it were this would be a big security hole.
> > there is no way to get users password in Linux unless
> > you have the authority to read the shadow file(root
> > privilege) and you use brute-force to get the
> > password...
>
> The shadow file contains a hash of the password, not
> the password. The password is not stored anywhere on
> a unix/linux system. If it were this would be a big
> security hole.
hey sabre,
when did i say that the shadow file contains the password... i said that you have to brute-force the shadow file to get the password which is absolutely possible... http://www.openwall.com/john/ and http://en.wikipedia.org/wiki/John_the_Ripper
regards
i_virus
Message was edited by:
i_virus
sabre and everyone,
i found out a good article under 'c' language that access under memory before write the shadow file and compare it with the password towards md5 hash.
i could imagine that it was possible because the SO salve under memory before write phisically.
Thanks,
Jos?