Thursday, January 7, 2010

A Classic example of T10 (ten minutes – ten marks). I know lot of you will still say it’s harsh on students. 10 minutes is too less a time to solve – but what happened today will help you to change your view a bit.

This is the true story of the topper of the batch, Utsav Basu, IEM, Kolkata. Topper of winter 2009 Nettech Kolkata program. For all of you who think 10 minutes is too less, this guy got 10 out of 10 in all lab tests till yesterday, then this happened. Trust me, getting 10 in all the tests, where Santu sir is ever-ready with his Bam___ its tough, I know it, I can vouch for it. I really feel sorry for Utsav, it should have been a 100% record in all lab test (a record of its own).


The test paper was relatively easy, it was an individual test, create 3 users with your loginid as aloginid, bloginid and cloginid. Then create a folder dataloginid in “/” inside the data folder create another folder driver. Now allow all there users to access dataloginid where they can view files but can’t create or delete. Inside driver aloginid and bloginid can create and delete where as cloginid can only view and read. Design the file structure and share the same on Samba for windows access.


Utsav did everything right, all permission, user, password, samba share. But the group name he used was 1 and 2 for the job.


I give below, sequence of commands he used for the user and group creation.


groupadd 1

groupapp 2


useradd –G 1,2 aloginid

useradd –G 1,2 bloginid

useradd –G 1 cloginid


There was no error. He never checked the /etc/group file or never used the groups command to check the group membership, as he was sure he was right.


But useradd command took the group name 1 and 2 as the groupid instead of group name. So according to those ids the groups are bin and daemon respectively. So aloginid and bloginid became member of bin and daemon rather than the group 1 and 2.


His group permission was correct (chgrp) his samba share was also precise, but he ignored the quality control and as a result 100% record marks also went with those two bin and daemon group.


I am sure, he can forget us, forget Nettech but bin and daemon and the groupid he will never forget. I will say T10 has served its very purpose.

0 comments:

Post a Comment