Virtual Partitions and Users


Each Virutal Partition is like a separate server. This means that you have separate users in your respective Virtual Partitions. Any user - related information that needs to be shared between Virtual Partitions would be done in the same manner as sharing between physically separate servers. For instance, you may want to have users have the capability to remotely login from one Virtual Partition to another. You would accomplish this by setting up the appropriate network files in each Virtual Partition just as you would with separate servers.

The vPars are isolated from a software perspective, so it is just as if the users exist on different servers. In order to share information among users, such as a database of users, you would implement technology such as Network Information System (NIS). With NIS you could create a database of user information that would be shared among different systems, and in this case, different vPars because they are the same as different servers from a software standpoint.

Let's now create a new user on each of the two vPars. On cable1 we'll create the user cable1us and verify that this user does not exist on cable2 . On cable2 we'll create the user cable2us and verify that this user does not exist on cable1 .

We've created the user cable1us in vPar cable1 and it exists only in cable1 . We'll verify this shortly. We've also created a user cable2us in vPar cable2.

There should now be one user in cable1 that is not viewable in cable2, and vice versa. The following shows connecting to cable1 and listing the contents of / etc/passwd .

 cvhdcon3:/ #  cat /etc/passwd  root:hiIXKsAzUIFy6:0:3::/:/sbin/sh  cable1   listing  daemon:*:1:5::/:/sbin/sh bin:*:2:2::/usr/bin:/sbin/sh sys:*:3:3::/: adm:*:4:4::/var/adm:/sbin/sh uucp:*:5:3::/var/spool/uucppublic:/usr/lbin/uucp/uucico lp:*:9:7::/var/spool/lp:/sbin/sh nuucp:*:11:11::/var/spool/uucppublic:/usr/lbin/uucp/uucico hpdb:*:27:1:ALLBASE:/:/sbin/sh nobody:*:-2:-2::/: www:*:30:1::/: webadmin:*:40:1::/usr/obam/server/nologindir:/usr/bin/false smbnull:*:101:101:DO NOT USE OR DELETE - needed by Samba:                                         /home/smbnull:/sbin/sh opc_op:*:777:77:OpC default operator:/home/opc_op:/usr/bin/ksh cable1us::102:20:,,,:/home/cable1us:/usr/bin/sh  <-- cable1us  cvhdcon3:/ # 

This listing for cable1 shows that cable1us exists in the /etc/passwd file on cable1 ; however, there is no cable2us present in this file.

The following shows connecting to cable2 and listing the contents of /etc/passwd .

 # cat /etc/passwd  cable2   listing  root:Jx66ARmhj.aBs:0:3::/:/sbin/sh daemon:*:1:5::/:/sbin/sh bin:*:2:2::/usr/bin:/sbin/sh sys:*:3:3::/: adm:*:4:4::/var/adm:/sbin/sh uucp:*:5:3::/var/spool/uucppublic:/usr/lbin/uucp/uucico lp:*:9:7::/var/spool/lp:/sbin/sh nuucp:*:11:11::/var/spool/uucppublic:/usr/lbin/uucp/uucico hpdb:*:27:1:ALLBASE:/:/sbin/sh nobody:*:-2:-2::/: www:*:30:1::/: webadmin:*:40:1::/usr/obam/server/nologindir:/usr/bin/false sam_exec:xxx:0:1::/home/sam_exec:/usr/bin/sh cable2us::101:20:,,,:/home/cable2us:/usr/bin/sh  <-- cable2us  # 

This listing for cable2 shows that cable2us exists in the /etc/passwd file on cable2 ; however, there is no cable1us present in this file

This listing shows that the unique users for the respective vPars exist only on the vPar on which they were created. In addition, each vPar has its own root and other system-level users.

Next let's look at setup information of individual users in vPars.

Individual User Setup

As far as setup for users is concerned , you perform setup in a vPars environment just as you would in a non-vPars environment. The prompt, for instance, might include the host name of your system. On a system where the host name and vPar name are different, you still probably want your prompt to include the hostname. You can, however; also include the vPar name at the prompt if you wish. The following is the section of /.profile that includes some minor customization for the user root :

 # Added for prompt, history etc.         HISTFILE=~/.sh_history;                 export HISTFILE         EDITOR=vi;                              export EDITOR         PS1="`whoami`@`hostname`"'[${PWD}] > '; export PS1 

This is the information I typically add for root to provide history file information and the prompt. I included the host name here, which would result in a prompt that includes the user's name, host name, and present working directory, as shown below:

 root@actappd1[/.root] > 

If your users need to see the vPar name, this can be added to or substituted for the hostname in .profile . This is another example of the advantage to having your hostname and vPar name identical. It may be; however, that your hostname is very confusing, and substituting a simple vPar name in the prompt may be advantageous to users. In either case, your user setup does not change with vPars, since vPars are the same as separate systems from a user perspective.

Application Users

Users that are required for specific applications need to be set up on all vPars on which an application is going to run. Since vPars are like individual systems, you'll put the users, including application users, on the vPars where you need them and not on others. On a system running Broadvision and Oracle, for instance, you would set up the users required for those applications. The following shows an /etc/passwd output on a system running these two applications:

 #  cat /etc/passwd  root:9Obj3Cya98pFo:0:3::/.root:/sbin/sh daemon:*:1:5::/:/sbin/sh bin:*:2:2::/usr/bin:/sbin/sh sys:*:3:3::/: adm:*:4:4::/var/adm:/sbin/sh uucp:*:5:3::/var/spool/uucppublic:/usr/lbin/uucp/uucico lp:*:9:7::/var/spool/lp:/sbin/sh nuucp:*:11:11::/var/spool/uucppublic:/usr/lbin/uucp/uucico hpdb:*:27:1:ALLBASE:/:/sbin/sh nobody:*:-2:-2::/: www:*:30:1::/: webadmin:*:40:1::/usr/obam/server/nologindir:/usr/bin/false smbnull:*:101:101:DO NOT USE OR DELETE - needed by Samba:/home/smbnull:/sbin/sh opc_op:*:777:77:OpC default operator:/home/opc_op:/usr/bin/ksh stssmrp:HFQrTOZx920Fg:1108:20:Martin Paul:/home/stssmrp:/bin/ksh stssmrpr:pugxhblYiahZI:0:3:Martin Paul:/home/stssmrp:/bin/ksh stssjtf:VammVKnIwD/T.:1185:20:John Fontanilla:/home/stssjtf:/usr/bin/ksh pbcombv:UzGN5gDTNfgQM:102:20:PB.COM User:/home/pbcombv:/usr/bin/ksh  <--   BV   user  oracle:11Z/oQQfEHzOo:1012:111:Oracle User:/home/oracle:/bin/ksh  <--   Oracle   user  # 

Note the last two users in the file for Broadvision ( pvcombv ) and Oracle ( oracle ) with their respective home directories. With these two applications running on the Virtual Partition, the appropriate users had to be set up.

The remainder of this chapter covers background information related to users.



HP-UX 11i Systems Administration Handbook and Toolkit
HP-UX 11i Systems Administration Handbook and Toolkit (2nd Edition)
ISBN: 0131018833
EAN: 2147483647
Year: 2003
Pages: 301

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net