Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Im looking for a way to link some bash scripts. Kinda the way you include php. I wanna have my password.sh ask for pass > launch Utility > Utility checks to see if its correct > if so it will move to next step > .. Some thing like that. I assume i would have top use a file to store my msd5 coded password (im sure ill find a way to lock that down).

So is this a possible task? if so were should i start reading? if now what would be a better lang to use for that function. but still using my bash as backend?

share|improve this question
Best look first on google, found this one: [How to include file in a bash shell script][1] [1]: stackoverflow.com/questions/10823635/… – nickanor Dec 28 '12 at 19:16
Sounds like what you really want is to verify that a user has entered his own password before doing something else. Encoded passwords are in /etc/shadow which only root can read, so if you want to read shadow file, you'll have to do something like create a setuid C program which does the encoding and chks if the encoded Pswd is the same as in /etc/shadow. As far as I know, shell scripts cannot run as setuid. – Chris Good Dec 30 '12 at 8:51
Just after I made my last post, I realised that asking people to enter their Unix password is a bad idea as they would need to trust that you are not going to do anything bad with it... – Chris Good Dec 30 '12 at 20:56
Need more clarification with example if possible – totti May 14 at 10:25

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.