help with C programme to lock remote resources


 
Thread Tools Search this Thread
Top Forums Programming help with C programme to lock remote resources
# 1  
Old 02-26-2009
help with C programme to lock remote resources

hello every one
i am working on a project to lock remote computer resources(hard drive, usb, cd- rom, folder etc). i have maintained connection using JAVA RMI and using JAVA JNI to lock resources, now i am really stuck up with C programme to do actual locking, i am using RHL-5 on admin computer and clients are using fedora and ubuntu. is it possible? or do linux have any utilities.
the architecture is- admin enforcing restrictions on clients.

please i require your help.
# 2  
Old 02-27-2009
still waiting

hello i am new to this forum and dont know if i am in right place to post this question. waiting for your reply.
# 3  
Old 02-28-2009
By lock do you mean 'prevent all other users from accessing'

Locking usually refers to file locking - lockf() for example. The reason you don't have a good answer (this is a poor answer) is that your question doesn't make sense.

Plus your system may not support mandatory file locking anyway.

Please simply state what the requirement is - your goal - NOT how you want to get to your goal -- perl java, C etc, is irrelevant. Based on what you said I would connect as root and change permissions on directories - devices are files, too. But that sounds patently pointless to me.
# 4  
Old 03-01-2009
thank you for your valuable suggestion.
yes i want to 'prevent all other users from accessing'

requirement of my project is to restrict the user from accessing some of the resources on his local machine.
can i do it the way you said?
# 5  
Old 03-01-2009
Quote:
I am working on a project to lock remote computer resources(hard drive, usb, cd- rom, folder etc).
You have your work cut out for you! One approach might be to use could try using SELinux.
# 6  
Old 03-01-2009
got it,
thank you all for your expertise and valuable help.
# 7  
Old 03-02-2009
You may also want to investigate ACL - access control lists. They provide very fine-grained control over accessing any file/device - ie., everybody but the username jmc can access this file/device. see: man chacl.

As with SELinux it may be painful to implement if this is implemented on a lot of different machines, and it will be a huge amount of work.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Testing privileges -lock lockfile /var/lock/subsys/..- Permission denied

Hi all, I have to test some user priviliges. The goal is to be sure that an unauthorized user can't restart some modules (ssh, mysql etc...). I'm trying to automate it with a shell script but in same cases I got the syslog broadcast message. Is there any way to simply get a return code... (3 Replies)
Discussion started by: Dedalus
3 Replies

2. Shell Programming and Scripting

programme is ok but not working in script

hi buddies; i have a very strange problem. i made a script composed of just 5 line. it is containing awk and nawk codes and it is working perfectly when it is applied one-by-one (copy & paste). but when i type run myscript.mos, it is giving: nawk: syntax error at source line 1 context is... (5 Replies)
Discussion started by: gc_sw
5 Replies

3. Red Hat

Security Question: Lock after invalid login, Session Lock and Required Minimum Password Length

Hello all, If anyone has time, I have a few questions: How do I do the following in Linux. We are using Red Hat and Oracle Enterprise Linux, which is based on Red Hat too. 1. How to lock the account after a few (like 3) invalid password attempts? 2. How do you lock a screen after 30... (1 Reply)
Discussion started by: nstarz
1 Replies

4. Programming

Help for coding this programme

for a floating-point array x whose size is n, find the geometric mean.. GM =n x1.x2.x3...xn (2 Replies)
Discussion started by: allyjaah
2 Replies

5. Programming

starting programme in C

hello, For school i make the next mission: give how many chambers in a constant number. use an array which chamber is free and count how many chamber there are free. make also something to test I don't now how to start. I need an well example so i can make the mission thank you (1 Reply)
Discussion started by: wouter88
1 Replies

6. Programming

cobol programme

I have some compile programme .crn now I want to run .crn programme on express cobol which allow only *.gnt programme any solution to run *.crn programme (0 Replies)
Discussion started by: bibi
0 Replies

7. Shell Programming and Scripting

snmpget in a perl programme

Hi Guyz can u tell me how to write a programme in perl using snmpget. Regards' Harrr (0 Replies)
Discussion started by: Harikrishna
0 Replies

8. Programming

Need help in a c programme

Dear Friends, I ve two text files like re_im.dat 13.7663000000 5.9572200000 10.2682000000 10.9345000000 5.0810700000 14.1132000000 two real values per row Sarf.dat 127 128 128 128 71 0 128 128 128 128 71 0 128 128 128 128 71 0 This is having 6... (2 Replies)
Discussion started by: user_prady
2 Replies

9. Shell Programming and Scripting

want to use output of c programme in expect

hi i am having a c code which gives the output of my password in text format i.e when i run my c code which which gives the password asfollows====>>>>>> $./passwdprogram ======>>>>>>abc@123(this is the output) now i have an expect script to remotely ssh which uses the password set in ... (0 Replies)
Discussion started by: xander
0 Replies

10. UNIX for Dummies Questions & Answers

how to lock keyboard without using lock command

how can I lock my keyboard while I'm away from the computer without using lock command. What other commands gives me the option to lock keyboard device? thanks (7 Replies)
Discussion started by: dianayun
7 Replies
Login or Register to Ask a Question