- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: unix script how to question
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2006 10:13 AM
03-09-2006 10:13 AM
unix script how to question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2006 10:20 AM
03-09-2006 10:20 AM
Re: unix script how to question
Assuming your menu-driven script is modularized w/ the use of functions, you might want to "return" instead of "exit" from the subshell created.
If you could attach your script then that would be most helpful in troubleshooting.
thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2006 11:17 AM
03-09-2006 11:17 AM
Re: unix script how to question
Create your menu script and make it the one specified in the shell field of '/etc/passwd'. In this fashion, any user of this account will be confined to your menu script when they login.
Offer the option in your menu of changing to a new group, using 'newgrp group'.
Offer any other options you want. Use an 'exit' in your menu script to log-off.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2006 06:29 AM
03-10-2006 06:29 AM
Re: unix script how to question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2006 06:50 AM
03-10-2006 06:50 AM
Re: unix script how to question
Take a look at this TKB document, might be relevant to your needs...
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000065953684
cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2006 02:14 AM
03-13-2006 02:14 AM
Re: unix script how to question
As an example we have a menuing system (homebuilt) to define specific database variables for different "groups"..
with you could call a function with the menu or call a sub shell to define variables.
We define $HOME as
/home/$group/$user
the $group defines the variable subset you will want to construct. You have to think our your process of creating users in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2006 02:34 AM
03-13-2006 02:34 AM
Re: unix script how to question
For all database users their is a set of GLOBAL and LOCAL variables.
We tied the USER to DISTRICTID.
DISTRICTID would be the equivalent to your GROUP although we are not using groups, we use the "$PATH" for /home/$DISTRICTID/ to define more local variables.
in the Base PATH of each district we have a seed file defining the "$DISTRICTID
/home/district/seedfile
in the menu We have a statement that reads in the variable:
cat ../seedfile |export IID=`awk '{print $1}'`
if you view the seedfile, it contains three characters. from it we define Database variables. You can setup a CASE statement in your menu to call specific district information as well.
clear
echo '
which database would you like to use:
1.) FINANCE DATABASE
........
s.) Sub Database - Production
Please select from one of the above: \c'
read choice
echo
case "$choice" in
1)PEIDBNAME=finance;;
...................
s)PEIDBNAME=subfin;;
*). dbmenu;;
esac
export PEIDBNAME
echo $PEIDBNAME
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2006 06:59 AM
03-13-2006 06:59 AM
Re: unix script how to question
I reviewed your article and I tried just copying the script in the article you referenced, but the script only output from "part 1 is executing", the part 2 and part 3 never came to the screen. Any thoughts?
Rex, I appreciated your input, in this situation the customers are seperated by unix groups because of data confidentiality. That is why I need "master users" to be able to work with the correct group in any given account.
I am thinking about a perl script that can fork off processes to handle making the correct group available based upon the environment they are working in.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2006 10:54 PM
06-25-2006 10:54 PM
Re: unix script how to question
I read this topic with interest as I have almost exactly the same issue, with newgrp starting a new shell when I actually just want it to set the group and continue execution of my script. I noticed the thread seemed to die a few months ago and was just wondering if you ever came up with a solution or work around? There has been the suggestion of the use of ACLs, but I would much rather use group based permissioning if at all possible. Any help you (or anyone else for that matter) can give on this topic much appreciated.
Regards,
Darran Rice