1834349 Members
2053 Online
110066 Solutions
New Discussion

Re: Adding Users

 
Nisar Ahmad
Regular Advisor

Adding Users

Hi There

I have built a HP-UX 11.23 server and want to add all the users sitting on the current production server. I have already restored passwd and group files and home directories on to the new server and it looks like all is ok but not sure it it is a abosolutely correct approach. If not what is the best way to add similar users on the new server ?

Thanks in advance. I will be very generous in poits

Nisar
10 REPLIES 10
Peter Godron
Honored Contributor

Re: Adding Users

Nissar,
don't forget to copy the /tcb directory if your systems are trusted.

Otherwise you may want to look at:
useradd
/usr/sam/lbin/usermod.sam
and
/usr/lbin/modprpw
Chauhan Amit
Respected Contributor

Re: Adding Users

Hi Nisar,

I believe this is a correct approach .

-Amit
If you are not a part of solution , then you are a part of problem
Darrel Louis
Honored Contributor

Re: Adding Users

Nisar,

To perform a check, use the following commands:
# pwck
# grpck
On a trusted system run:
# authck
See man authck
# pwconv
For updating the tcb database

Darrel
Nisar Ahmad
Regular Advisor

Re: Adding Users

Hi All

I am just worried if transfering information from HP-UX 11.00 trusted to 11.23 would have no issues in future.

Thanks

Nisar
Nisar Ahmad
Regular Advisor

Re: Adding Users

Hi All

I am just worried if transfering information from HP-UX 11.00 trusted to 11.23 would have no issues in future. My boss is asking me to add all the users from scratch which is not a easy job. If it is the best approach then any body got a script to add all the users in one go reading info's from the current passwd/group files ?

Thanks

Nisar
RAC_1
Honored Contributor

Re: Adding Users

There should not be a problem. But make sure that you run pwck, grpck and authck to check if tcb database has any errors or not.
There is no substitute to HARDWORK
A. Clay Stephenson
Acclaimed Contributor

Re: Adding Users

The data formats (Trusted and untrusted) are compatible. The data (even under /tcb) are just textfiles. However, make sure that you have backups of your original files including the /tcb tree, if trusted AND that you are logged in as root in at least two separate sessions. That way, you can get yourself out of trouble almost as fast as you got yourself in should the need arise.
If it ain't broke, I can fix that.
GBR
Regular Advisor

Re: Adding Users

I've never needed to do this, but why not try pulling a report of the users currently setup on the production environment and create a master file script of all users that adds the each user using the command 'useradd'. If the groups, permissions are mirrored b/w the servers then use this master file any time you need to add the users to a new server or make any updates to their permissions. Keep this file updated each time you make any changes. If this seems like too much overhead then just continue to maintain your users as you are.

GBR
doug hosking
Esteemed Contributor

Re: Adding Users

Also beware that some of the trusted mode files live under /.secure and /usr/spool/cron (.cronaids and .ataids).

If you have auditing configured, there are additional things to consider.

The suggestion to run authck is a very good one.