I want to restrict the perticular command to user.
ex: CD, CP, mv etc .,
"A" user cannot user CD, CP, mv commands from his home directory.
so please let me know the procedure how to restrict the commands access to user "A".
I really thankfull to all. Please help me out.
(make sure to do a chmod +x cp so it can be executed)
Then, if the user tries to execute a cp command from the directory with your cp script, they will get an error.
Not foolproof, but one thought.
By the way, back in the early PC days I had to do many things like this - especially for the format command. Amazing how many early computer users reformatted their own hard disk drive rather than the floppy disk. They would type format rather than format a: and then -- poof -- gone would be their hard disk and all its contents.
You can give the user a restricted shell like rksh. That would prevent him to use the cd command.
As of cp, mv and so on, use ACLs to protect the homedir files from the user and use a restricted PATH to limit the commands that user will be able to launch.