Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi...
well i am new to linux programming. can any one give the code for password.
that means when we enter password it has to check it with root password and return the value. i'm working on security for files. If we leave the system open any one can see the contents of it.so i want to write a system call for security to files.It will ask the password for all the files.And i'm not a cracker or a professional programmer.This is my mini project and has to submit it very soon so plz help me soon
please help me out from this from last 2 months i'm trying.
thank you in advance.
Last edited by anil007523; 07-29-2010 at 07:37 AM.
hi...
well i am new to linux programming. can any one give the code for password.
that means when we enter password it has to check it with root password and return the value.
IMO you can find the root password only through /etc directory which itself requires a root password.
Your going to need to explain more about what exactly your trying to achieve.
It SOUNDS like your trying to build a password cracker, but that wont work if you can't access the place the hashes of the passwords are stored (which is passworded...).
It does not matter whether you are root or not. Even if you can read /etc/shadow, you will not be able to de-crypt the encrypted passwords.
Please post more information on what exactly you need to do, and why. It sounds like homework, but no responsible teacher is going to give out assignments on how to retrieve passwords.
Please post more information on what exactly you need to do, and why. It sounds like homework, but no responsible teacher is going to give out assignments on how to retrieve passwords.
Why not, isn't part of learning about security learning how to break into something?
Of course it has to come with lessions about the ethical implications of what your doing, or might use it for.
anil007523 - Please don't edit your original post for additions, instead post a new post so we can see what you've added - makes following the convo alot easier.
You've just proven what pixellany said, You can't access files, even if the workstation is unlocked you've got no access beyond that of the user your logged in as.
UNLESS you left it logged in as root, but this is idiotic and if someone did this then there is no security which would protect them (other than the fact the content of some files is encrypted.)
You've just proven what pixellany said, You can't access files, even if the workstation is unlocked you've got no access beyond that of the user your logged in as.
UNLESS you left it logged in as root, but this is idiotic and if someone did this then there is no security which would protect them (other than the fact the content of some files is encrypted.)
Pixel said "Even if you can read /etc/shadow,...", so my question was since through cat command I can't see the shadow file, then how can I read or Decrypt it ?
though I don't understand "workstation is unlocked"
Pixel said "Even if you can read /etc/shadow,...", so my question was since through cat command I can't see the shadow file, then how can I read or Decrypt it ?
though I don't understand "workstation is unlocked"
Only root can read that file. You must be logged in as root to see the content (which is then encrypted as well).
By unlocked, I mean someone has left it logged in and not secured it after using it.
--------------
Slightly offtopic - Is this for your disseration at university? The fact you've been working on it for two months, and want it so soon makes me feel that it maybe. If so your going to have to define the problem your trying to fix more clearly as I dont see exactly what your trying to prove.
Last edited by djsmiley2k; 07-29-2010 at 08:19 AM.
Reason: Offtopic note.
root can read (and write) ALL files or--if necessary--can change the permissions to enable it.
But--if I am not mistaken--NO-ONE can decrypt the entries in /etc/shadow.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.