The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > HP-UX
Google UNIX.COM


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
User creation lbreddy SUN Solaris 7 03-08-2008 02:45 AM
User Creation in Sun Solaris manoj.solaris SUN Solaris 1 09-12-2007 04:14 AM
user creation privileage jarkvarma UNIX for Dummies Questions & Answers 4 11-09-2001 08:07 AM
user creation problem jarkvarma UNIX for Dummies Questions & Answers 1 11-05-2001 10:11 AM
user creation using shell script for JSP jarkvarma Shell Programming and Scripting 1 11-04-2001 08:27 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-15-2007
Registered User
 

Join Date: Dec 2006
Posts: 22
user creation in 2nd server.

Dear frnds,
I have 2 hp ux 11i servers(S1 & S2) in cluster. In S1 I created all the users. Is it necessary to create the same users one by one in S2 also ?

pls help me.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-15-2007
andryk's Avatar
Registered User
 

Join Date: Sep 2003
Posts: 448
Just check /etc/passwd in both nodes, it is likely that you will do the same on the 2nd node (creating users)
Reply With Quote
  #3 (permalink)  
Old 02-16-2007
Registered User
 

Join Date: Dec 2006
Posts: 22
thanks dear andryk,

my intension is a shortcut, i think it wont be possible, creation of user is not only in passwd file no? it needs to create the user directory entries too ? anyhow if there is any solution pls send me.

regards
Reply With Quote
  #4 (permalink)  
Old 02-17-2007
Registered User
 

Join Date: Dec 2006
Posts: 27
You have to do this:
1)Copy the passwd and group files to the second server ( first backup your files)


2) The you have to create manually each directory, but you can use the passwd file to do a little script to make all directorys with this scripts automatically. Have you ever have done any scripts??

Another solutions is to share with NFS the hard disk of your firts server, make a link for the passwd and group of second machine pointing to the firts machine. You will also need to share the home directory of users, but in this solutions you will lost some disk space.
Hope it works..
Reply With Quote
  #5 (permalink)  
Old 02-19-2007
Registered User
 

Join Date: Dec 2006
Posts: 22
thank you very much moren,

can u email me the sample script to create user directories.

regards
Reply With Quote
  #6 (permalink)  
Old 02-20-2007
Registered User
 

Join Date: Dec 2006
Posts: 27
if your passwd file is like this:

smith:*:100:100:8A-74(office):/home/smith:/usr/bin/sh
guest:*:200:0::/home/guest:/usr/bin/sh
...
....
.....

your script should be like this(depending your shell, the header may change):

#!/bin/sh
mkdir /home/smith
mkdir /home/guest
....
....


maybe you should use also the command chown for each directorio to change the owner from root to the user:group

If you use a replace tool you can change tha passwd file for the commands of the script very easy.
Hope It helps you.
Reply With Quote
  #7 (permalink)  
Old 02-20-2007
Registered User
 

Join Date: Dec 2006
Posts: 22
Dear moren,

thanks for the reply, but i am lazy to create all the user directories with induvidual entries, could you suggest me a script which takes the username from the passwd file and creates concerned user directory in /home?

regards
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:38 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0