novicebaan
1st September 2003, 19:47
hi all,
i have to create 200 users unix users
one way is to create a user through syman and update ora_user file.
Can we write a shell script for the same
pl. write in detail
thanx in advnace
victor_cleto
3rd September 2003, 20:58
We use scripts for user creations/deletions (only the baan part is done manually most of the time).
You create a file containing the user login, user name, whathever extra fiedls you need and then your script reads each line and does:
- a useradd to create the user
- create the user in the DB using a sql script
- add an entry into ora_users or call the ora8_maint script to add it in ora_users/oracle
to automatically add the users in Baan, this is more tricky and not easy to do in fast/good way...
jpvdgiessen
4th September 2003, 22:37
If you are running on HP-UX:
/usr/sam/lbin/useradd.sam -g bsp -d /home/${UnxUser} -c "${UnxName},${UnxDepartment},${UnxTelephone}," -s /usr/bin/sh -o -u ${UnxUid} ${UnxUser}
NvanBeest
5th September 2003, 00:23
Also, have a look at the ora8_admin6.1 (or 6.2 for V) file. It is a shell script, calling ora8_maint6.1 program to do all sorts of stuff. Nice examples in there!
To see what you can do with the program ora8_maint6.x, use the -U option to check the syntax. Here is this info for 6.1:
bsp@minerva:/afs1/bivc/bin $ ora8_maint6.1 -U
Add an user.
[ -n ] -a Baan user -m Oracle user -p User password -G group { -P Group Password | -F -c OracleDBA -i OracleDBApassword }
Change Oracle user password.
[ -n ] -r Baan user -m Oracle user -p New password { -F { -o current password | -c OracleDBA -i OracleDBApassword } }
Drop an user.
[ -n ] -d Baan user -G Group { -P Group Password | -F -c OracleDBA -i OracleDBApassword }
Add a group.
[ -n ] -A group -P Group Password { -F -c OracleDBA -i OracleDBApassword }
Change group password.
[ -n ] -R group -P Group Password { -F { -o Current Group Password | -c OracleDBA -i OracleDBApassword } }
Drop a group.
[ -n ] -D group { -P Group password | -F -c OracleDBA -i OracleDBApassword }
Check password.
-h -m Oracle user -p password
Batch mode.
-b batchfile
Redirect errors to errorfile.
-q errorfile
List users / groups.
-l/L
List storage.
-S <table> -C <custno> -u <user> -O <object>
Command line passwords encrypted / Batch file password not encrypted.
-Q
Print usage.
-U/?
bsp@minerva:/afs1/bivc/bin $
novicebaan
10th September 2003, 10:49
please write in detail with one example so i ca success
hope for a quick reply
jpvdgiessen
10th September 2003, 21:46
First what kind of OS your are running AIX, HP-UX or Solaris or an other *nix variant.
For HP-UX see my last message, for AIX you can use
mkuser logname
For the database see the comments of my collegue Nico