I've been doing Linux and AIX administration for years, but I'm very new to HPUX. We have an old audit process which involves someone manually using sam to generate user lists. I'd like to kill that old process with fire...
But...
After working a bit in the morning to try and pull that same list from the command line I am coming up empty. I could, I suppose, pull each user from the file one by on in a loop and run queries about them but that is ugly.
I tried listing the SAM commands to a file and using them to the list but that also did nothing.
How do I get this list, at the command line..
xqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqx
xUsers 0 of 186 selectedx
xqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqx
x Login User ID x
x Name Activated (UID) Real Name x
xlqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
xx user1 yes 1103 User Name1 ^ x
xx user2 yes 1155 username2 x
xx user3 yes 1008 username3r x x
Again, I'm sure to some of you this is a total newbie question and I have tried RTFM but I thought maybe you could help me out..
From your description, I am not at all sure that I understand what you are trying to do.
Are you trying to create a file that looks like the file you showed us in post #1 from unspecified input sources? If this is what you want, how are we supposed to guess where this data comes from?
Or, do you have a text file like the file you showed us in post #1 from which you want to extract a list of login names, a list of user IDs, or a list of real names? If this is what you want, which of those three lists do you want? And, what form should that list take? (All values on one line with a comma between values? All values on one line with a tab between them? Each value on a separate line? ...)
If you want a list of real names, you need to give us some way to clearly identify where that name starts and ends in your file. (In you sample data sometimes it is the 5th word, sometimes it is the 5th and 6th word, sometimes it is the complete line with the 1st 4 fields and the last field removed and then removing leading and trailing spaces on what is left, and sometimes it is the complete line with the 1st 4 fields and the last 2 fields removed and then removing the leading and trailing spaces. The starting character position and ending character position vary between lines, so we can't just use character positions.)
Once you have your file or list, what are you going to do with it?
You said you tried RTFM. Which pages in the manual did you try to read? Did you look at cut and tail ? Did you look at awk ?
SAM logs its activities, did you go and have a look what you can find there?
That's what I used to do when I had HP-UX boxes, and wanted to batch script thing I did using SAM...