Hello,

On Wed, 09 Sep 2009, Govi wrote:
> I want to restrict users normal command.i mean specified users must use only
> below command,

1. Make rbash the user's shell using change shell.

2. Set the PATH to something like /usr/local/rbash/bin

        echo "PATH=/usr/local/rbash/bin" >> /home/user/.profile
        chown root.root /home/user/.profile
        chmod og-w /home/user/.profile
        chattr +i /home/user/.profile

3. Link the binaries to this directory

        for i in mv dig telnet ssh
        do 
                ln -s $(type -path $i) /usr/local/rbash/bin/
        done
        chown root.root /usr/local/rbash/bin/

4. Test it out! (Perhaps you need to copy or hard link the binaries
and symbolic links are not allowed).

Regards,

Kapil.
--

_______________________________________________
To unsubscribe, email [email protected] with 
"unsubscribe <password> <address>"
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to