Hello,
I am happy to announce that the application is finally ready.
Thanks to all those who helped with their valuable inputs.
The system not only marks employees as present with their thumbnail photos and a monthly report but it also rejects wrong names and prevents duplicate / repeat marking for every day. If an employee signs on someone else's name then his photo is clicked with that user's name and his hanky panky is recorded. After a duration of some hours that will be decided by the company boss, the system even marks those who are absent as 'Absent' in their monthly log.
Adding or removing users is simply a process of editing a single text file with a list of employees.
Greetings,
On 3/25/11, Rony Bill gnulinuxist@gmail.com wrote:
I am happy to announce that the application is finally ready.
Great!! Wonderful!! Fantastic!!
May a red lettered day be marked in Indian FLOSS Calandre for this application.
Is it FLOSS? Where is the link?
With warmest regards,
Rajagopal
On Friday 25 March 2011 06:25 AM, Rajagopal Swaminathan wrote:
Greetings,
On 3/25/11, Rony Billgnulinuxist@gmail.com wrote:
I am happy to announce that the application is finally ready.
Great!! Wonderful!! Fantastic!!
May a red lettered day be marked in Indian FLOSS Calandre for this application.
Thanks for your reply but please avoid the heavy praising formality. I am not a programmer and have no knowledge of any programming language. There is no heavy coding or server and database in this system.
Is it FLOSS? Where is the link?
It is a simple bash script just like the one I had already posted earlier. It was tweaked with the 'date +%s -d 'today 10am'' option that Binand had suggested and I have added variables to make it a common script. Conditional statements have been added to keep out those who are not in the list of employees and those who have already marked themselves for that day. To do this There are 2 text files used as reference. One is a list of employees. The user_name is checked against this list. In the other text file, everyday before everyone arrives, a cron job will wipe its contents. Whenever a user is marked, the name is appended to this blank file called 'present' as members who are present. If a user is in the 'present' file then he/she cannot re-muster for that day. There is a second script that will daily run after some hours and it takes every name in the list of employees file and compares it with those in the 'present' file and marks those who are not present as Absent in their monthly log.
On Fri, Mar 25, 2011 at 12:00 PM, Rony gnulinuxist@gmail.com wrote:
Is it FLOSS? Where is the link?
It is a simple bash script just like the one I had already posted earlier.
Link, Please. Or it is just another tupperware.
Can we have a details of all the techniques including biometrics and method of input etc. What are required to setup it?
A.S. Ansari, Kolkata
On Fri, Mar 25, 2011 at 12:00 PM, Rony gnulinuxist@gmail.com wrote:
On Friday 25 March 2011 06:25 AM, Rajagopal Swaminathan wrote:
Greetings,
On 3/25/11, Rony Billgnulinuxist@gmail.com wrote:
I am happy to announce that the application is finally ready.
Great!! Wonderful!! Fantastic!!
May a red lettered day be marked in Indian FLOSS Calandre for this
application.
Thanks for your reply but please avoid the heavy praising formality. I am not a programmer and have no knowledge of any programming language. There is no heavy coding or server and database in this system.
Is it FLOSS? Where is the link?
It is a simple bash script just like the one I had already posted earlier. It was tweaked with the 'date +%s -d 'today 10am'' option that Binand had suggested and I have added variables to make it a common script. Conditional statements have been added to keep out those who are not in the list of employees and those who have already marked themselves for that day. To do this There are 2 text files used as reference. One is a list of employees. The user_name is checked against this list. In the other text file, everyday before everyone arrives, a cron job will wipe its contents. Whenever a user is marked, the name is appended to this blank file called 'present' as members who are present. If a user is in the 'present' file then he/she cannot re-muster for that day. There is a second script that will daily run after some hours and it takes every name in the list of employees file and compares it with those in the 'present' file and marks those who are not present as Absent in their monthly log.
--
As a proper list etiquette..... Please trim your replies. Avoid cross posting to other lists. Members do not want to waste time answering same queries that may have been answered on other lists. Replies from other lists, to cross posted mails are not available to our members. Post your replies below the relevant original text, leaving a line space. Do not re-use old messages to write new ones. For new messages, create a new message.
Regards,
Rony.
On Fri, 2011-03-25 at 12:00 +0530, Rony wrote:
Thanks for your reply but please avoid the heavy praising formality. I am not a programmer and have no knowledge of any programming language. There is no heavy coding or server and database in this system.
whatever - code is of no use unless it is shared. I suggest you take an account on bitbucket or something, put the script under version control, add a license and put it up. Who knows? Some one some where may find it useful (I think I have seen this sentence somewhere)
ps. a small prize for guessing what license Rony will choose ;-)
On Fri, Mar 25, 2011 at 12:25 PM, Kenneth Gonsalves lawgon@thenilgiris.comwrote:
On Fri, 2011-03-25 at 12:00 +0530, Rony wrote:
Thanks for your reply but please avoid the heavy praising formality. I am not a programmer and have no knowledge of any programming language. There is no heavy coding or server and database in this system.
whatever - code is of no use unless it is shared. I suggest you take an account on bitbucket or something, put the script under version control, add a license and put it up. Who knows? Some one some where may find it useful (I think I have seen this sentence somewhere)
Could you guide me on this process?
ps. a small prize for guessing what license Rony will choose ;-)
GPL of course. :-)
Please do comment on the script too even if you find it silly or crappy.
-- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/
On Fri, 2011-03-25 at 12:39 +0530, Rony Bill wrote:
Could you guide me on this process?
1. register for an account at bitbucket and set up a repository - that is easy
2. make sure you have mercurial installed in your system (apt-get install mercurial)
3. put your script and any support files in a separate directory
4. run hg init - you will now have a mercurial repository
5. run hg add <filename> (this will add each file)
6. run hg commit -m 'some comment' -u username
7. the run hg push https://bitbucket.org/bitbucketusername/repositoryname
8. voila - your code is under version control and on the net (noble prize is around the corner)
9. whenever you change your code, do a commit and a push
On Fri, 2011-03-25 at 01:34 +0530, Rony Bill wrote:
I am happy to announce that the application is finally ready.
url?
On Fri, Mar 25, 2011 at 10:01 AM, Kenneth Gonsalves lawgon@thenilgiris.comwrote:
On Fri, 2011-03-25 at 01:34 +0530, Rony Bill wrote:
I am happy to announce that the application is finally ready.
url?
No url available but I am posting the 2 scripts. Create 2 text files called 'employees' and 'present'. In the 'employees' file add your single names (no space) one below the other.
The main script is called 'muster' and is given below.
#!/bin/bash echo -e "Welcome to Your Company" echo -n "Please enter your name: " read -e USER if grep -q "$USER" employees then echo "Thank you for your entry." else echo "Sorry! Your name does not appear in our records." exit fi if grep -q "$USER" present then echo "Sorry! You have already logged in today." else DATE=$(date +%d-%m-%Y) MONTH=$(date +%b-%Y) CUR=$(date +%s) REF=$(date +%s -d 'today 10am') DIFF=$(( $CUR - $REF )) streamer -c /dev/video0 -b 16 -q -o $USER.jpeg convert $USER.jpeg -resize 60x40 $USER-$DATE.jpeg rm -f $USER.jpeg MIN=$(($DIFF/60)) echo "$DATE $USER $MIN" >> $USER-$MONTH.csv echo "$USER" >> present fi exit
The other script is called 'absent' and is given below.
#!/bin/bash
DATE=$(date +%d-%m-%Y) MONTH=$(date +%b-%Y)
for i in $(cat employees); do if grep -q "$i" present then echo > /dev/null else echo "$DATE $i Absent" >> $i-$MONTH.csv fi done
All you need is a linux compatible webcam and the 2 scripts and the 2 text files and you are ready with the Low Cost Attendance Registering System with Biometrics. This script will run even on older machines that cannot handle server software.
-- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/
On Fri, Mar 25, 2011 at 12:22 PM, Rony Bill gnulinuxist@gmail.com wrote:
On Fri, Mar 25, 2011 at 10:01 AM, Kenneth Gonsalves lawgon@thenilgiris.comwrote:
On Fri, 2011-03-25 at 01:34 +0530, Rony Bill wrote:
I am happy to announce that the application is finally ready.
url?
No url available but I am posting the 2 scripts. Create 2 text files called 'employees' and 'present'. In the 'employees' file add your single names (no space) one below the other.
The main script is called 'muster' and is given below.
#!/bin/bash echo -e "Welcome to Your Company" echo -n "Please enter your name: " read -e USER if grep -q "$USER" employees then echo "Thank you for your entry." else echo "Sorry! Your name does not appear in our records." exit fi if grep -q "$USER" present then echo "Sorry! You have already logged in today." else DATE=$(date +%d-%m-%Y) MONTH=$(date +%b-%Y) CUR=$(date +%s) REF=$(date +%s -d 'today 10am') DIFF=$(( $CUR - $REF )) streamer -c /dev/video0 -b 16 -q -o $USER.jpeg convert $USER.jpeg -resize 60x40 $USER-$DATE.jpeg rm -f $USER.jpeg MIN=$(($DIFF/60)) echo "$DATE $USER $MIN" >> $USER-$MONTH.csv echo "$USER" >> present fi exit
The other script is called 'absent' and is given below.
#!/bin/bash
DATE=$(date +%d-%m-%Y) MONTH=$(date +%b-%Y)
for i in $(cat employees); do if grep -q "$i" present then echo > /dev/null else echo "$DATE $i Absent" >> $i-$MONTH.csv fi done
All you need is a linux compatible webcam and the 2 scripts and the 2 text files and you are ready with the Low Cost Attendance Registering System with Biometrics. This script will run even on older machines that cannot handle server software.
understood - but How you are using webcam to identify the person?
-- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/
-- As a proper list etiquette..... Please trim your replies. Avoid cross posting to other lists. Members do not want to waste time answering same queries that may have been answered on other lists. Replies from other lists, to cross posted mails are not available to our members. Post your replies below the relevant original text, leaving a line space. Do not re-use old messages to write new ones. For new messages, create a new message.Regards,
Rony.
On Friday 25 March 2011 04:18 PM, Abdus Samad Ansari wrote:
On Fri, Mar 25, 2011 at 12:22 PM, Rony Billgnulinuxist@gmail.com wrote:
All you need is a linux compatible webcam and the 2 scripts and the 2 text files and you are ready with the Low Cost Attendance Registering System with Biometrics. This script will run even on older machines that cannot handle server software.
understood - but How you are using webcam to identify the person?
The camera clicks a photo of the person who is entering a user_name. The photo click is for record keeping only and does not have any face recognition feature. If it is found that some employees are punching in their friends' names, too the records help the boss in knowing who is the person in the picture. It acts as a watchdog over the punching activity.
2011/3/25 Rony Bill gnulinuxist@gmail.com:
if grep -q "$USER" present then echo "Sorry! You have already logged in today."
I have several comments on style and other issues, but this snippet is plain buggy. Imagine two users, prabhakaran and karan. If the former has marked his attendance, this code will not allow the latter to do so at all.
Binand
On Friday 25 March 2011 05:56 PM, Binand Sethumadhavan wrote:
2011/3/25 Rony Billgnulinuxist@gmail.com:
if grep -q "$USER" present then echo "Sorry! You have already logged in today."
I have several comments on style and other issues, but this snippet is plain buggy. Imagine two users, prabhakaran and karan. If the former has marked his attendance, this code will not allow the latter to do so at all.
I will check it out. There must be some grep option to look for absolute values. I did find some extra code that could be removed. For eg. The streamer and convert can use the same name for the jpeg and avoid the rm -rf $USER.jpeg line.
Hi Rony,
On Fri, Mar 25, 2011 at 6:29 PM, Rony wrote:
I will check it out. There must be some grep option to look for absolute values.
Since you are storing each name on a line by itself, you can use:
grep -q "^$USER$" present
The ^ and $ match the beginning and the end of the line respectively. Read the "Regular Expressions" section of the grep man page for more information.
Regards Osric Xavier Fernandes
Hi,
Am Samstag, den 26.03.2011, 23:18 +0530 schrieb Osric Fernandes:
On Fri, Mar 25, 2011 at 6:29 PM, Rony wrote:
I will check it out. There must be some grep option to look for absolute values.
Since you are storing each name on a line by itself, you can use:
grep -q "^$USER$" present
The ^ and $ match the beginning and the end of the line respectively. Read the "Regular Expressions" section of the grep man page for more information.
as discussed in the meeting, this is not sufficient. Safer would be $ fgrep -qx "$USER" present
Greetings, Joachim
2011/3/27 Joachim Breitner mail@joachim-breitner.de:
grep -q "^$USER$" present
as discussed in the meeting, this is not sufficient. Safer would be $ fgrep -qx "$USER" present
Why is the first one not sufficient? Why is it unsafe?
Binand
On Sunday 27 Mar 2011, Binand Sethumadhavan wrote:
2011/3/27 Joachim Breitner mail@joachim-breitner.de:
grep -q "^$USER$" present
as discussed in the meeting, this is not sufficient. Safer would be $ fgrep -qx "$USER" present
Why is the first one not sufficient? Why is it unsafe?
Both are unsafe. Consider the user who enters his username as (literally):
Raj `rm -rf /`Mathur
Then your grep command translates to:
grep -q "^Raj `rm -rf /`Mathur$" present
and if your app is running as root, voila! no more files on your system! The user is marked present too :)
The OP needs to do much more thinking about input sanitisation.
Regards,
-- Raj
2011/3/27 Raj Mathur (राज माथुर) raju@linux-delhi.org:
Both are unsafe. Consider the user who enters his username as (literally):
Raj `rm -rf /`Mathur
Indeed. Good catch. I had checked for forward ticks which bash appeared to escape properly but only assumed backticks would be escaped similarly.
Binand
Hi,
Am Sonntag, den 27.03.2011, 08:16 +0530 schrieb Raj Mathur (राज माथुर):
On Sunday 27 Mar 2011, Binand Sethumadhavan wrote:
2011/3/27 Joachim Breitner mail@joachim-breitner.de:
grep -q "^$USER$" present
as discussed in the meeting, this is not sufficient. Safer would be $ fgrep -qx "$USER" present
Why is the first one not sufficient? Why is it unsafe?
Both are unsafe. Consider the user who enters his username as (literally):
Raj `rm -rf /`Mathur
Then your grep command translates to:
grep -q "^Raj `rm -rf /`Mathur$" present
and if your app is running as root, voila! no more files on your system! The user is marked present too :)
The OP needs to do much more thinking about input sanitisation.
No, this line is safe with $ fgrep -qx "$USER" present
Thanks to the quotes around $USER, the `...` part would not be executed. But the quotes should be around every use of USER, in the later part of the code your exploit works.
Greetings, Joachim
On Sunday 27 Mar 2011, Joachim Breitner wrote:
Am Sonntag, den 27.03.2011, 08:16 +0530 schrieb Raj Mathur (राज माथुर):
Both are unsafe. Consider the user who enters his username as
(literally): Raj `rm -rf /`Mathur
Then your grep command translates to: grep -q "^Raj `rm -rf /`Mathur$" present
and if your app is running as root, voila! no more files on your system! The user is marked present too :)
The OP needs to do much more thinking about input sanitisation.
No, this line is safe with $ fgrep -qx "$USER" present
Thanks to the quotes around $USER, the `...` part would not be executed. But the quotes should be around every use of USER, in the later part of the code your exploit works.
That is not correct. Please read up on shell quoting before posting definitive but wrong information to a public mailing list.
The exploit I posted will work.
Regards,
-- Raj
2011/3/27 Joachim Breitner mail@joachim-breitner.de:
No, this line is safe with $ fgrep -qx "$USER" present
Thanks to the quotes around $USER, the `...` part would not be executed.
Hmm... you are right. Bash seems enclose variable expansions with single quotes by default in case the value contains special characters nowadays. See:
Binand
On Sunday 27 Mar 2011, Joachim Breitner wrote:
Am Sonntag, den 27.03.2011, 08:16 +0530 schrieb Raj Mathur (राज माथुर):
Both are unsafe. Consider the user who enters his username as
(literally): Raj `rm -rf /`Mathur
Then your grep command translates to: grep -q "^Raj `rm -rf /`Mathur$" present
and if your app is running as root, voila! no more files on your system! The user is marked present too :)
The OP needs to do much more thinking about input sanitisation.
No, this line is safe with $ fgrep -qx "$USER" present
Thanks to the quotes around $USER, the `...` part would not be executed. But the quotes should be around every use of USER, in the later part of the code your exploit works.
As Binand pointed out in personal mail, you are absolutely correct and the shell will not interpret `...` commands in a variable read from a user.
My apologies.
Regards,
-- Raj
2011/3/27 Raj Mathur (राज माथुर):
On Sunday 27 Mar 2011, Joachim Breitner wrote:
No, this line is safe with $ fgrep -qx "$USER" present
Thanks to the quotes around $USER, the `...` part would not be executed. But the quotes should be around every use of USER, in the later part of the code your exploit works.
As Binand pointed out in personal mail, you are absolutely correct and the shell will not interpret `...` commands in a variable read from a user.
So, given BASH's treatment of quoted variables, is there any difference between the two?
grep -q "^$USER$" present fgrep -qx "$USER" present
Regards Osric Xavier Fernandes
Hi,
Am Sonntag, den 27.03.2011, 12:52 +0530 schrieb Osric Fernandes:
2011/3/27 Raj Mathur (राज माथुर):
On Sunday 27 Mar 2011, Joachim Breitner wrote:
No, this line is safe with $ fgrep -qx "$USER" present
Thanks to the quotes around $USER, the `...` part would not be executed. But the quotes should be around every use of USER, in the later part of the code your exploit works.
As Binand pointed out in personal mail, you are absolutely correct and the shell will not interpret `...` commands in a variable read from a user.
So, given BASH's treatment of quoted variables, is there any difference between the two?
grep -q "^$USER$" present fgrep -qx "$USER" present
yes. If present contains:
Anup Deepak
and $USER is set to “.*” then the first one will return true (because the regular expression .* matches at least one line in present) while the second will correctly say that it is not in present.
You have to distinguish between special characters interpreted by bash and special characters interpreted by grep.
Greetings, Joachim
On Sunday 27 March 2011 02:38 AM, Joachim Breitner wrote:
Hi,
Am Samstag, den 26.03.2011, 23:18 +0530 schrieb Osric Fernandes:
On Fri, Mar 25, 2011 at 6:29 PM, Rony wrote:
I will check it out. There must be some grep option to look for absolute values.
Since you are storing each name on a line by itself, you can use:
grep -q "^$USER$" present
The ^ and $ match the beginning and the end of the line respectively. Read the "Regular Expressions" section of the grep man page for more information.
as discussed in the meeting, this is not sufficient. Safer would be $ fgrep -qx "$USER" present
Greetings, Joachim
Thanks Joachim. For the first time I actually saw how a code can be cracked into, via an input string only. For the benefit of those who were not present, Joachim was able to crack the user name even though that name was not in the list. Instead of a known username, he used a username string expression that only looked for an alphabet and it was naturally found among the many names. That allowed him in as a valid user.
This is a very good example of how opening the code allows it to be improvised and become free of bugs.
Hi,
Am Sonntag, den 27.03.2011, 12:00 +0530 schrieb Rony:
Thanks Joachim. For the first time I actually saw how a code can be cracked into, via an input string only. For the benefit of those who were not present, Joachim was able to crack the user name even though that name was not in the list. Instead of a known username, he used a username string expression that only looked for an alphabet and it was naturally found among the many names. That allowed him in as a valid user.
This is a very good example of how opening the code allows it to be improvised and become free of bugs.
actually, if I had a little more time, I could have also shown how to construct a user input that would appear to be a valid user, would appear not not be already present, so that we get to the code where pictures were taken, and then, due to missing quotes around the variable name, arbitrary commands could have been executed. As the script was planned to run as root, this would give the attacker full control over the machine.
Greetings, Joachim
On Sunday 27 March 2011 12:14 PM, Joachim Breitner wrote:
Hi,
Am Sonntag, den 27.03.2011, 12:00 +0530 schrieb Rony:
Thanks Joachim. For the first time I actually saw how a code can be cracked into, via an input string only. For the benefit of those who were not present, Joachim was able to crack the user name even though that name was not in the list. Instead of a known username, he used a username string expression that only looked for an alphabet and it was naturally found among the many names. That allowed him in as a valid user.
This is a very good example of how opening the code allows it to be improvised and become free of bugs.
actually, if I had a little more time, I could have also shown how to construct a user input that would appear to be a valid user, would appear not not be already present, so that we get to the code where pictures were taken, and then, due to missing quotes around the variable name, arbitrary commands could have been executed. As the script was planned to run as root, this would give the attacker full control over the machine.
Greetings, Joachim
After your inputs, as a precaution, I will not run the script as root. Seperate folders will be made for the scripts which will be owned and grouped by root only and users will be 'others' and will get only execute permissions. Read and Write will be removed for them.
2011/3/27 Rony gnulinuxist@gmail.com:
Seperate folders will be made for the scripts which will be owned and grouped by root only and users will be 'others' and will get only execute permissions. Read and Write will be removed for them.
If I remember my Unix permissions correctly, scripts and other interpreted language source files need to be readable by the interpreter - even with hash-bangs, binfmt_misc.o magic etc.
Binand
Hello,
In the said attendance system, the customer's plan was to mark all those who are earlier than the reference time or absent as 0. They maintain a regular register too and that will show absent or present. At present the system was just meant to calculate the total time an employee is late every month. However this lack of facility in the software was pointed out by Mehul and other members at the meet and I thought of a way out. Once the company decides the man hours per month -> day -> number of hours per day, we can get the total minutes for the day which is a constant value. Therefore instead of marking the person absent as 0, the daily total hours/min value could be added for that day. Thus in the monthly summation, it will accurately cut the person's day salary as required. The exact value of daily hours/min will be custom decided by the company management.
On Sun, 2011-03-27 at 12:00 +0530, Rony wrote:
This is a very good example of how opening the code allows it to be improvised and become free of bugs.
where is the code?
Yesterday at the client's place Debian 6 was installed on one spare machine and the attendance system was installed without the camera temporarily on it. Although the plan was to avoid running the scripts as root, the problem was that whenever the user ran the script, the photos and csv files are created with user's ownership and group. This made the files easy to edit and remove the bad records. Therefore I had to put everything in a root owned container and the sudoer's file was edited to allow the user only this particular command as root. Thus all data was root owned and inaccessible to the user.
Maybe some experts on the list can suggest how to make a command run as user but keep the data generated from it safe from editing by the user.
Today I bought the web cam iBall 8.0 Face2Face. It worked fine in my Ubuntu 10.04 netbook. It was detected by Debian 6 but worked only in the GUI using the 'cheese' utility. It did not work with 'streamer'. After spending half a day with different options, finally in the evening, I had to knock off Debian and install Ubuntu 10.04. The script works fine. However the "^$USER" had to be changed to "$USER", only then the fgrep -x options work (in all systems). Ubuntu had to be tweaked to remove a lot of user access to disks and devices, something that is natural in Debian.
Everything is set properly and tomorrow will be the D-day when it will be used by the employees. Thanks to everyone who helped in making this a success.
On Thu, 2011-03-31 at 22:32 +0530, Rony wrote:
Everything is set properly and tomorrow will be the D-day when it will be used by the employees. Thanks to everyone who helped in making this a success.
and the url to the repo with the code?
2011/4/1 Kenneth Gonsalves lawgon@thenilgiris.com:
and the url to the repo with the code?
Bachche ki jaan loge kya? It is about 25 lines of shell script which he has posted here and has been dissected to death already. :-)
Binand
On Fri, 2011-04-01 at 12:10 +0530, Binand Sethumadhavan wrote:
2011/4/1 Kenneth Gonsalves lawgon@thenilgiris.com:
and the url to the repo with the code?
Bachche ki jaan loge kya? It is about 25 lines of shell script which he has posted here and has been dissected to death already. :-)
that is beside the point. And kindly fix your mail client so that replies go to the list and not to you.
2011/4/1 Kenneth Gonsalves lawgon@thenilgiris.com:
It is about 25 lines of shell script which he has posted here and has been dissected to death already. :-)
that is beside the point.
Which point is it beside to? He has released the code, and he specified the license under which he has released it. What more do you want?
Binand
On Fri, 2011-04-01 at 13:44 +0530, Binand Sethumadhavan wrote:
2011/4/1 Kenneth Gonsalves lawgon@thenilgiris.com:
It is about 25 lines of shell script which he has posted here and has been dissected to death already. :-)
that is beside the point.
Which point is it beside to? He has released the code, and he specified the license under which he has released it. What more do you want?
well, in my opinion, open source software, be it a script of 25 lines or a kernel of lakhs of lines, is not truly open source unless:
1. it is in a public repository
2. it is under version control
3. it is supported by a ticketing system
the present script is only available in the archives of this list. It is not under version control. The issues and solutions proposed and done can only be got by mining the archives. A license has been specified, but the conditions for release under the said license have not been satisfied, so it is as good as public domain.
what more do you want?
and please stop cc-ing me on every post, just send it to the list - mailman will see that I get my copy.
2011/4/1 Kenneth Gonsalves lawgon@thenilgiris.com:
well, in my opinion, open source software, be it a script of 25 lines or a kernel of lakhs of lines, is not truly open source unless:
[snip]
Fortunately or unfortunately, the world has a different definition of open source. Why would a developer go through all this if she does not intend to support the code or continue development on it? Releasing open source code shouldn't be a millstone.
Binand
On Fri, 2011-04-01 at 16:28 +0530, Binand Sethumadhavan wrote:
2011/4/1 Kenneth Gonsalves lawgon@thenilgiris.com:
well, in my opinion, open source software, be it a script of 25
lines or
a kernel of lakhs of lines, is not truly open source unless:
[snip]
Fortunately or unfortunately, the world has a different definition of open source.
what is the 'worlds' definition of open source?
Why would a developer go through all this if she does not intend to support the code or continue development on it?
Rony is not going to support the code or continue development on it?
Releasing open source code shouldn't be a millstone.
what is the millstone? version control? ticketing? complying with the chosen license? encouraging people to contribute because of the above? I agree in the last century doing all this was a pain and expensive too. Now it is free and can be done with a few clicks of a mouse.
as a matter of fact, it is impossible to develop decent scripts/software without all the above.
and for heavens sake refrain from cc-ing me on every post - what exactly is so difficult about pressing 'reply' instead of pressing 'reply-all'?
2011/4/1 Kenneth Gonsalves lawgon@thenilgiris.com:
Fortunately or unfortunately, the world has a different definition of open source.
what is the 'worlds' definition of open source?
You could start here: http://opensource.org/docs/osd
Releasing open source code shouldn't be a millstone.
what is the millstone? version control? ticketing? complying with the chosen license? encouraging people to contribute because of the above? I agree in the last century doing all this was a pain and expensive too. Now it is free and can be done with a few clicks of a mouse.
1. Complying with the chosen license - there is no question of the author having to comply with any license. The license is for the rest of the world.
2. Ticketing - yes, it indicates a commitment to maintain, so the author might not want to do this. Ditto for version control and all the rest.
as a matter of fact, it is impossible to develop decent scripts/software without all the above.
Depends. I doubt if I need version control and ticketing for the script I use to extract IP addresses from a log file.
and for heavens sake refrain from cc-ing me on every post - what exactly is so difficult about pressing 'reply' instead of pressing 'reply-all'?
Well, I didn't want to answer this - but since you insist, I wouldn't change my actions to suit your wishes. If you don't like it, you are welcome to take corrective action at your end.
Binand
On Fri, 2011-04-01 at 21:30 +0530, Binand Sethumadhavan wrote:
and for heavens sake refrain from cc-ing me on every post - what
exactly
is so difficult about pressing 'reply' instead of pressing
'reply-all'?
Well, I didn't want to answer this - but since you insist, I wouldn't change my actions to suit your wishes. If you don't like it, you are welcome to take corrective action at your end.
done - bye
On Friday 01 April 2011 04:28 PM, Binand Sethumadhavan wrote:
2011/4/1 Kenneth Gonsalveslawgon@thenilgiris.com:
well, in my opinion, open source software, be it a script of 25 lines or a kernel of lakhs of lines, is not truly open source unless:
[snip]
Fortunately or unfortunately, the world has a different definition of open source. Why would a developer go through all this if she does not intend to support the code or continue development on it? Releasing open source code shouldn't be a millstone.
Its a he not she.
2011/4/1 Rony gnulinuxist@gmail.com:
Why would a developer go through all this if she does not intend to support the code or continue development on it?
Its a he not she.
I know you are a he. I was referring to J. Random Developer and was only being politically correct.
Binand
On Friday 01 April 2011 12:10 PM, Binand Sethumadhavan wrote:
2011/4/1 Kenneth Gonsalveslawgon@thenilgiris.com:
and the url to the repo with the code?
Bachche ki jaan loge kya? It is about 25 lines of shell script which he has posted here and has been dissected to death already. :-)
Scripting and programming is not my main field of work. Since 1988 I have been into electronics and maintenance like VCRs, fax machines and later computers. During those early years I used to even design and assemble my own digital circuits, made my own circuit boards at home, made transparent PCB sticker designs that were then given outside for better finish. In those days there used to be black tapes, dots etc. of various sizes to make PCB drawings.
On Fri, 2011-04-01 at 19:30 +0530, Rony wrote:
On Friday 01 April 2011 12:10 PM, Binand Sethumadhavan wrote:
2011/4/1 Kenneth Gonsalveslawgon@thenilgiris.com:
and the url to the repo with the code?
Bachche ki jaan loge kya? It is about 25 lines of shell script which he has posted here and has been dissected to death already. :-)
Scripting and programming is not my main field of work. Since 1988 I have been into electronics and maintenance like VCRs, fax machines and later computers. During those early years I used to even design and assemble my own digital circuits, made my own circuit boards at home, made transparent PCB sticker designs that were then given outside for better finish. In those days there used to be black tapes, dots etc. of various sizes to make PCB drawings.
so what is the harm in putting up all your work in a repo?
On Friday 01 April 2011 07:29 AM, Kenneth Gonsalves wrote:
On Thu, 2011-03-31 at 22:32 +0530, Rony wrote:
Everything is set properly and tomorrow will be the D-day when it will be used by the employees. Thanks to everyone who helped in making this a success.
and the url to the repo with the code?
Repos are generally servers with binary packages. This one is a raw bash script. I am thinking of putting it up on a wiki and let others add code to it.
On Fri, 2011-04-01 at 19:16 +0530, Rony wrote:
and the url to the repo with the code?
Repos are generally servers with binary packages.
what on earth does this mean?
On Saturday 02 April 2011 06:34 AM, Kenneth Gonsalves wrote:
On Fri, 2011-04-01 at 19:16 +0530, Rony wrote:
and the url to the repo with the code?
Repos are generally servers with binary packages.
what on earth does this mean?
deb or rpm or tar.gz packages. Since this script is still not encapsulated in any package, it should be put on a wiki (which I will do ASAP).
On Sat, 2011-04-02 at 12:35 +0530, Rony wrote:
On Saturday 02 April 2011 06:34 AM, Kenneth Gonsalves wrote:
On Fri, 2011-04-01 at 19:16 +0530, Rony wrote:
and the url to the repo with the code?
Repos are generally servers with binary packages.
what on earth does this mean?
deb or rpm or tar.gz packages. Since this script is still not encapsulated in any package, it should be put on a wiki (which I will do ASAP).
please check my reply on another thread - an open source repository has nothing to do with repositories supporting packages. An open source repository is a place where you can put your code under version control with license info, documentation, ticketing support etc. Check out github, sourceforge, bitbucket, savannah ...
On Sat, 2011-04-02 at 14:28 +0530, Kenneth Gonsalves wrote:
deb or rpm or tar.gz packages. Since this script is still not encapsulated in any package, it should be put on a wiki (which I
will
do ASAP).
please check my reply on another thread - an open source repository has nothing to do with repositories supporting packages. An open source repository is a place where you can put your code under version control with license info, documentation, ticketing support etc. Check out github, sourceforge, bitbucket, savannah ...
and please do not put your script in a wiki - a wiki is not the place for support and maintainence of code.
On Saturday 02 April 2011 02:43 PM, Kenneth Gonsalves wrote:
and please do not put your script in a wiki - a wiki is not the place for support and maintainence of code.
Already done that.
On Sat, 2011-04-02 at 16:50 +0530, Rony wrote:
On Saturday 02 April 2011 02:43 PM, Kenneth Gonsalves wrote:
and please do not put your script in a wiki - a wiki is not the
place
for support and maintainence of code.
Already done that.
anyway I am inspired to do a python port of the scripts. Here:
https://bitbucket.org/lawgon/lcars/overview
On Sat, Apr 2, 2011 at 5:41 PM, Kenneth Gonsalves lawgon@thenilgiris.comwrote:
On Sat, 2011-04-02 at 16:50 +0530, Rony wrote:
On Saturday 02 April 2011 02:43 PM, Kenneth Gonsalves wrote:
and please do not put your script in a wiki - a wiki is not the
place
for support and maintainence of code.
Already done that.
anyway I am inspired to do a python port of the scripts. Here:
Good work. Thanks and all the best. :-)
On Sat, 2011-04-02 at 21:08 +0530, Rony Bill wrote:
anyway I am inspired to do a python port of the scripts. Here:
Good work. Thanks and all the best. :-)
btw, unless you put GPL notice in *all* the files, some bad guy is going to steal your code.
On Monday 04 April 2011 11:15 AM, Kenneth Gonsalves wrote:
On Sat, 2011-04-02 at 21:08 +0530, Rony Bill wrote:
anyway I am inspired to do a python port of the scripts. Here:
Good work. Thanks and all the best. :-)
btw, unless you put GPL notice in *all* the files, some bad guy is going to steal your code.
How do I do it for all files?
On Mon, 2011-04-04 at 11:26 +0530, Rony wrote:
On Monday 04 April 2011 11:15 AM, Kenneth Gonsalves wrote:
On Sat, 2011-04-02 at 21:08 +0530, Rony Bill wrote:
anyway I am inspired to do a python port of the scripts. Here:
Good work. Thanks and all the best. :-)
btw, unless you put GPL notice in *all* the files, some bad guy is
going
to steal your code.
How do I do it for all files?
open any file in any GPL'd software on your machine and you will see how.
On Monday 04 April 2011 11:45 AM, Kenneth Gonsalves wrote:
On Mon, 2011-04-04 at 11:26 +0530, Rony wrote:
On Monday 04 April 2011 11:15 AM, Kenneth Gonsalves wrote:
On Sat, 2011-04-02 at 21:08 +0530, Rony Bill wrote:
anyway I am inspired to do a python port of the scripts. Here:
Good work. Thanks and all the best. :-)
btw, unless you put GPL notice in *all* the files, some bad guy is
going
to steal your code.
How do I do it for all files?
open any file in any GPL'd software on your machine and you will see how.
I did that. Have a look at the link and tell me if it is okay.
http://db.glug-bom.org/wiki/index.php/Low_Cost_Attendance_Registering_System
On Mon, 2011-04-04 at 12:45 +0530, Rony wrote:
On Monday 04 April 2011 11:45 AM, Kenneth Gonsalves wrote:
On Mon, 2011-04-04 at 11:26 +0530, Rony wrote:
On Monday 04 April 2011 11:15 AM, Kenneth Gonsalves wrote:
On Sat, 2011-04-02 at 21:08 +0530, Rony Bill wrote:
anyway I am inspired to do a python port of the scripts. Here:
Good work. Thanks and all the best. :-)
btw, unless you put GPL notice in *all* the files, some bad guy is
going
to steal your code.
How do I do it for all files?
open any file in any GPL'd software on your machine and you will see how.
I did that. Have a look at the link and tell me if it is okay.
it is ok - but the script won't run. Comment the GPL lines.
On Monday 04 April 2011 02:21 PM, Kenneth Gonsalves wrote:
On Mon, 2011-04-04 at 12:45 +0530, Rony wrote:
On Monday 04 April 2011 11:45 AM, Kenneth Gonsalves wrote:
On Mon, 2011-04-04 at 11:26 +0530, Rony wrote:
On Monday 04 April 2011 11:15 AM, Kenneth Gonsalves wrote:
On Sat, 2011-04-02 at 21:08 +0530, Rony Bill wrote:
> anyway I am inspired to do a python port of the scripts. Here: > > https://bitbucket.org/lawgon/lcars/overview > > Good work. Thanks and all the best. :-)
btw, unless you put GPL notice in *all* the files, some bad guy is
going
to steal your code.
How do I do it for all files?
open any file in any GPL'd software on your machine and you will see how.
I did that. Have a look at the link and tell me if it is okay.
it is ok - but the script won't run. Comment the GPL lines.
Oops! Will do that.
On Mon, 2011-04-04 at 17:53 +0530, Rony wrote:
it is ok - but the script won't run. Comment the GPL lines.
Oops! Will do that.
and I think the hashbang has to be the *first* line
On Tuesday 05 April 2011 07:02 AM, Kenneth Gonsalves wrote:
On Mon, 2011-04-04 at 17:53 +0530, Rony wrote:
it is ok - but the script won't run. Comment the GPL lines.
Oops! Will do that.
and I think the hashbang has to be the *first* line
Every line or else it becomes the script to be run.
2011/4/5 Rony gnulinuxist@gmail.com:
and I think the hashbang has to be the *first* line
Every line or else it becomes the script to be run.
It means, your script should look like:
#!/bin/bash # This program is free software blah blah... echo "stuff"
The sequence "#!" is called the hashbang. The hash needs to be the first byte in the file, and the bang needs to be the second.
Binand
Hey its very nice yaar i am bit new in scripting but will get to learn a lot from this i will also try to add a half-day marking lets see will post the same n will ask your guidance where ever required.
On Wed, Apr 6, 2011 at 7:33 AM, Binand Sethumadhavan binand@gmail.comwrote:
2011/4/5 Rony gnulinuxist@gmail.com:
and I think the hashbang has to be the *first* line
Every line or else it becomes the script to be run.
It means, your script should look like:
#!/bin/bash # This program is free software blah blah... echo "stuff"
The sequence "#!" is called the hashbang. The hash needs to be the first byte in the file, and the bang needs to be the second.
Binand
On Wed, 2011-04-06 at 11:08 +0530, Vishal Shinde wrote:
Hey its very nice yaar i am bit new in scripting but will get to learn a lot from this i will also try to add a half-day marking lets see will post the same n will ask your guidance where ever required.
all the best in your efforts.
ps kindly refrain from top posting. Also try to use standard english grammar and spelling.
Thank you for your wishes and suggestion KG i was assuming that this group is for FOSS and sharing the same dint knew it is for english coaching also will follow the same next time.
On Wed, Apr 6, 2011 at 11:24 AM, Kenneth Gonsalves lawgon@thenilgiris.comwrote:
On Wed, 2011-04-06 at 11:08 +0530, Vishal Shinde wrote:
Hey its very nice yaar i am bit new in scripting but will get to learn a lot from this i will also try to add a half-day marking lets see will post the same n will ask your guidance where ever required.
all the best in your efforts.
ps kindly refrain from top posting. Also try to use standard english grammar and spelling. -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/
On Wed, 2011-04-06 at 12:05 +0530, Vishal Shinde wrote:
Thank you for your wishes and suggestion KG i was assuming that this group is for FOSS and sharing the same dint knew it is for english coaching also will follow the same next time.
unfortunately English is the prime language for FOSS, and you will not get far if you ignore the rules of grammar and composition. It is one thing if English is not your first language, and therefore construction of sentences is awkward - no one objects to that. But deliberately mangling the language is another thing. You will find in the international lists that this irritates people and you will not be respected
s/didn't/dint
and please refrain from top posting. If you do not know what is top posting and why it is bad, please take the trouble to find out.
Hi Vishal,
On Wed, Apr 6, 2011 at 12:05 PM, Vishal Shinde vishal.linux85@gmail.com wrote:
Thank you for your wishes and suggestion KG i was assuming that this group is for FOSS and sharing the same dint knew it is for english coaching also will follow the same next time.
Please do not top post when you send mail to mailing lists. It violates the list guidelines. Use interleaved posting. And, In mailing lists, we do not use SMS style words. So, please avoid them. And, please take comments made in the list in the right spirit. No one aims to hurt you personally. Take comments as a feedback for self-improvement.
And, please go through mailing list guidelines so that you can understand the dos and dont's. Thanks
On Wed, Apr 6, 2011 at 12:05 PM, Vishal Shinde vishal.linux85@gmail.com wrote:
Thank you for your wishes and suggestion KG i was assuming that this group is for FOSS and sharing the same dint knew it is for english coaching also will follow the same next time.
On Wed, Apr 6, 2011 at 11:24 AM, Kenneth Gonsalves lawgon@thenilgiris.comwrote:
On Wed, 2011-04-06 at 11:08 +0530, Vishal Shinde wrote:
Hey its very nice yaar i am bit new in scripting but will get to learn a lot from this i will also try to add a half-day marking lets see will post the same n will ask your guidance where ever required.
^^^ I think the reference is to SMS speak.
-- Arun Khan
2011/4/4 Kenneth Gonsalves lawgon@thenilgiris.com:
btw, unless you put GPL notice in *all* the files, some bad guy is going to steal your code.
Which lawgon has already done, by taking your code into his repository and releasing everything under the BSD license. :-)
Binand
On Monday 04 April 2011 12:06 PM, Binand Sethumadhavan wrote:
2011/4/4 Kenneth Gonsalveslawgon@thenilgiris.com:
btw, unless you put GPL notice in *all* the files, some bad guy is going to steal your code.
Which lawgon has already done, by taking your code into his repository and releasing everything under the BSD license. :-)
I saw that. I want to see what license gets better results. :-)
On Mon, 2011-04-04 at 12:23 +0530, Rony wrote:
On Monday 04 April 2011 12:06 PM, Binand Sethumadhavan wrote:
2011/4/4 Kenneth Gonsalveslawgon@thenilgiris.com:
btw, unless you put GPL notice in *all* the files, some bad guy is
going
to steal your code.
Which lawgon has already done, by taking your code into his
repository
and releasing everything under the BSD license. :-)
I saw that. I want to see what license gets better results. :-)
actually I have *not* released *your* code - it is just there as a template for porting to python (and also to teach you a lesson). And if you take the trouble to put a GPL notice on your code, I will mirror that (although I am not bound to, I can just keep that version under BSD license - but since I know zilch about shell scripting I have no intention of developing it further)
2011/4/4 Kenneth Gonsalves lawgon@thenilgiris.com:
actually I have *not* released *your* code - it is just there as a template for porting to python (and also to teach you a lesson).
Doesn't putting up code on a public-access website one controls imply "releasing"?
Is "teach you a lesson" a valid reason for violating someone else's copyright?
Binand
On Monday 04 Apr 2011, Binand Sethumadhavan wrote:
2011/4/4 Kenneth Gonsalves lawgon@thenilgiris.com:
btw, unless you put GPL notice in *all* the files, some bad guy is going to steal your code.
Which lawgon has already done, by taking your code into his repository and releasing everything under the BSD license. :-)
Are you serious?
-- Raj
Hi,
Am Montag, den 04.04.2011, 11:15 +0530 schrieb Kenneth Gonsalves:
On Sat, 2011-04-02 at 21:08 +0530, Rony Bill wrote:
anyway I am inspired to do a python port of the scripts. Here:
Good work. Thanks and all the best. :-)
btw, unless you put GPL notice in *all* the files, some bad guy is going to steal your code.
not quite. If there is no license mentioned, then one cannot do legally anything with the code. After all, the GPL _gives_ you right that you do _not_ have without.
OTOH, a bad guy can steal the code no matter what notice you put there :-)
Greetings, Joachim
On Tue, 2011-04-05 at 19:26 +0530, Joachim Breitner wrote:
btw, unless you put GPL notice in *all* the files, some bad guy is
going
to steal your code.
not quite. If there is no license mentioned, then one cannot do legally anything with the code. After all, the GPL _gives_ you right that you do _not_ have without.
that is correct - but in this case he has widely proclaimed that anyone can do anything with the code, which basically means he has put it in public domain
OTOH, a bad guy can steal the code no matter what notice you put there :-)
very true - I am quite sure some bad guys have already done so ;-)
2011/3/31 Rony gnulinuxist@gmail.com:
I had to put everything in a root owned container and the sudoer's file was edited to allow the user only this particular command as root. Thus all data was root owned and inaccessible to the user.
This is almost always a bad idea. There are any number of possible attacks - path based, fire redirection based etc. that is possible with this. For example, how does the "stramer" program work - does it overwrite the file specified by -o? In that case, what will happen if I do this first:
ln -s /etc/passwd ./binand.jpeg
and run your script?
Binand
On Friday 01 April 2011 08:21 AM, Binand Sethumadhavan wrote:
2011/3/31 Ronygnulinuxist@gmail.com:
I had to put everything in a root owned container and the sudoer's file was edited to allow the user only this particular command as root. Thus all data was root owned and inaccessible to the user.
This is almost always a bad idea. There are any number of possible attacks - path based, fire redirection based etc. that is possible with this. For example, how does the "stramer" program work - does it overwrite the file specified by -o? In that case, what will happen if I do this first:
ln -s /etc/passwd ./binand.jpeg
and run your script?
How would you create a script for a user that creates and updates files but does not allow the user to edit them later? Any idea is welcome.
Hi,
Am Freitag, den 01.04.2011, 19:32 +0530 schrieb Rony:
How would you create a script for a user that creates and updates files but does not allow the user to edit them later? Any idea is welcome.
create a special user just for this purpose, make the directory with the configuration and images only writable by that user, and use sudo to enable everyone to run your script (and only your script) as this special user.
Greetings, Joachim
On Saturday 02 April 2011 11:01 PM, Joachim Breitner wrote:
Hi,
Am Freitag, den 01.04.2011, 19:32 +0530 schrieb Rony:
How would you create a script for a user that creates and updates files but does not allow the user to edit them later? Any idea is welcome.
create a special user just for this purpose, make the directory with the configuration and images only writable by that user, and use sudo to enable everyone to run your script (and only your script) as this special user.
Greetings, Joachim
Thanks I will do that. I was under the impression that sudo is only for running as root. I will look up the docs and make the changes.
On Saturday 02 April 2011 11:01 PM, Joachim Breitner wrote:
Hi,
Am Freitag, den 01.04.2011, 19:32 +0530 schrieb Rony:
How would you create a script for a user that creates and updates files but does not allow the user to edit them later? Any idea is welcome.
create a special user just for this purpose, make the directory with the configuration and images only writable by that user, and use sudo to enable everyone to run your script (and only your script) as this special user.
Greetings, Joachim
I did it. The wiki will also be updated with this modification. Thanks.
Hi,
Am Donnerstag, den 31.03.2011, 22:32 +0530 schrieb Rony:
The script works fine. However the "^$USER" had to be changed to "$USER", only then the fgrep -x options work (in all systems). Ubuntu had to be tweaked to remove a
That’s expected, with fgrep -x you do not need ^ to get the desired effect.
Greetings, Joachim
On Friday 25 March 2011 05:56 PM, Binand Sethumadhavan wrote:
2011/3/25 Rony Billgnulinuxist@gmail.com:
if grep -q "$USER" present then echo "Sorry! You have already logged in today."
I have several comments on style and other issues, but this snippet is plain buggy. Imagine two users, prabhakaran and karan. If the former has marked his attendance, this code will not allow the latter to do so at all.
I created a test script like the above
#!/bin/bash
echo -n "Please enter your name: " read -e USER if grep -q "$USER" namelist then echo $USER else echo "Name does not exist" fi
In namelist file I added Rony, Macrony and karan.
While both rony and Rony are accepted, for the other 2 names they are even case sensitive and do not accept macrony or Karan. Even prabhakaran and karunakaran are rejected. Why rony is not case sensitive is still a mystery.
2011/3/25 Rony gnulinuxist@gmail.com:
Why rony is not case sensitive is still a mystery.
It isn't. Rony matches the full word, rony matches part of Macrony. Grep matches patterns in whole lines, not words unless the pattern tries to identify words. Also, grep in its default invocation is case sensitive.
Binand
On Fri, Mar 25, 2011 at 11:56:51PM +0530, Rony wrote:
On Friday 25 March 2011 05:56 PM, Binand Sethumadhavan wrote:
2011/3/25 Rony Billgnulinuxist@gmail.com:
if grep -q "$USER" present then echo "Sorry! You have already logged in today."
I have several comments on style and other issues, but this snippet is plain buggy. Imagine two users, prabhakaran and karan. If the former has marked his attendance, this code will not allow the latter to do so at all.
I created a test script like the above
#!/bin/bash
echo -n "Please enter your name: " read -e USER if grep -q "$USER" namelist then echo $USER else echo "Name does not exist" fi
In namelist file I added Rony, Macrony and karan.
While both rony and Rony are accepted, for the other 2 names they are even case sensitive and do not accept macrony or Karan. Even prabhakaran and karunakaran are rejected. Why rony is not case sensitive is still a mystery.
I've heard that awk is very good at these text things. Ever gave it a try? I don't know much about it, just giving a hint.
Btw, there is this string of tutorials on awk at bashshell.net starting with: http://bashshell.net/stream-filtering-utilities/exercise-1-learning-awk-basi...