Hi there ! I would assume at this stage that your user accounts use /bin/bash as the default shell.
Here is what you do : 1) Place your script in a directory where you can find it easily. For example , let's call your script '/usr/scripts/myscript'. This is the script that runs your menu system. 2) Change to the user "abc" home directory. ( cd ~abc ) 3) Edit the '.bash_profile' file. 4) Ensure that '/usr/scripts/myscript' has the appropriate permissions , based on your execution method : a) Using the 'dot' command : '. /usr/scripts/myscript' This will mean that the current shell will execute the script without invoking a sub-shell process. For this , your script will need only read permission. b) Using explicit execution : '/bin/bash /usr/scripts/myscript' This will invoke a subshell to execute your script. Your script must have read permission for user "abc" to execute in this fashion c) Execute script using implicit execution : '/usr/scripts/myscript' You simply place the name of your script with it's full path name in your file. No preceding 'dot' or 'bash'. This requires that your script has BOTH READ and EXECUTE permissions for the user "abc" ( This method will also invoke a subshell ) 4) Place a command within the '.bash_profile' to execute '/usr/scripts/myscript' , according to 4a)-c) stated above. For security reasons , you should always fully qualify your commands and scripts with their absolute pathnames. 5) At the bottom of the '.bash_profile' file , AFTER the line where you execute '/usr/scripts/myscript' , insert an 'exit 0' command. When the user "abc" logs on , the '/usr/scripts/myscript' will execute , and then "abc" will be immediately logged out of the system , and will not have access to a shell prompt. Regards , Jason Dale ----- Original Message ----- From: "Jason Lim" <[EMAIL PROTECTED]> To: "Seawolf" <[EMAIL PROTECTED]> Sent: Monday, October 28, 2002 9:16 AM Subject: Menu security > Hi all, > > I have a simple script which running a menu as below when i logon as > user "abc" > > A. Check Hard Disk Space > B. Check Mem Info > C. Check CPU Info > > What my question is how can I configure this user "abc" can only access > to this menu. > > > > > -- > Thanks & Regards, > > Jason Lim > Email:[EMAIL PROTECTED] > > > > _______________________________________________ > Seawolf-list mailing list > [EMAIL PROTECTED] > https://listman.redhat.com/mailman/listinfo/seawolf-list _______________________________________________ Seawolf-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/seawolf-list