03-18-2011
Can you post your "user add" script.
The unix HP-UX "useradd" command will take a "-u UID" parameter. It is not difficult to modify a script which invokes "useradd" to ensure that the UID is one UID greater than the highest UID in /etc/passwd.
If this was a virgin system you'd need to create an account with a UID of 1000 to seed the process.
10 More Discussions You Might Find Interesting
1. HP-UX
Hi ,
I am using adduser in hp-ux to create users in Hp-ux.
i would like to know what are the valid values for uids and gids in hp-ux
what are the rannges for the valid uids .
How to check what are the used uids in Hp-ux .
Thanks
Narendra babu C (7 Replies)
Discussion started by: naren_chella
7 Replies
2. Linux
I am trying to submit a background process on a remote machine using
ssh -f remote-host "sh my-process.sh"
Normally the process will be submitted and control returned to the local machine (even when the process is running on the remote machine)
I want to get the process id of the submitted... (4 Replies)
Discussion started by: superuser84
4 Replies
3. Shell Programming and Scripting
Hi,
Please anyone help to achive this using perl or unix scripting .
This is date in my table 20090224,based on the date need to check the files,If file exist for that date then increment by 1 for that date and check till max date 'i.e.20090301 and push those files .
files1_20090224... (2 Replies)
Discussion started by: akil
2 Replies
4. Shell Programming and Scripting
Hi All,
Is there a way to save a range in variable for later printing?
for example write somthing like this:
awk '
/pattern1/,/pattern2/{f=range}
/pattern3/{print f}
'
I don't know excatly what "range" could be but is there a way to do this? (8 Replies)
Discussion started by: ghoda2_10
8 Replies
5. UNIX for Dummies Questions & Answers
I have a list of about 200,000 lines in a text file that look like this:
1 1 120
1 80 200
1 150 270
5 50 170
5 100 220
5 300 420
The first column is an identifier, the next 2 columns are a range (always 120 value range)
I'm trying fill in the values of those ranges, and remove... (4 Replies)
Discussion started by: knott76
4 Replies
6. Shell Programming and Scripting
I have a problem that I cant figure out what to do in this function i need it to count multiple ranges like 0 10, 5 10, 1 100. I know that my counter needs to be outside the function and that it needs to be set to the lowest numbered positional parameter but thats were I am having trouble if... (6 Replies)
Discussion started by: Emin_Em
6 Replies
7. UNIX for Dummies Questions & Answers
Good day to everyone!
So, let's start :)
I have a file with a numbers in some ranges
for example:
1 10
49 72
...
and this file need to transform to:
1
2
3
4 (14 Replies)
Discussion started by: shizik
14 Replies
8. Shell Programming and Scripting
Hi,
I have two files
file1 chr1_22450_22500
chr2_12300_12350
chr1_34500_34550
file2 11000_13000
15000_19000
33000_44000
If the file 1 ranges fall between file2 ranges then assign the value of file2 in column 2 to file1
output:
chr2_12300_12350 11000_13000
chr1_34500_34550 ... (7 Replies)
Discussion started by: Diya123
7 Replies
9. IP Networking
Greetings folks,
I have a rather lengthy list of banned IP ranges in iptables. Initially it was constructed as a rather ad-hoc affair, then later I discovered a site which had IP Block By Country lists, and imported several into iptables.
If possible, I'd like to be able to verify if the list... (0 Replies)
Discussion started by: putter1900
0 Replies
10. Shell Programming and Scripting
Dear Unix gurus,
I have sample data organised like this and containing 6 columns (with headers):
label c2 c3 c4 c5 c6
where c2 to c6 are numeric values in columns c2 to 6.
I am trying to create a simple output in a new file containing 3 columns:
label max(c2 c3) max(c4 c5 c6)
... (4 Replies)
Discussion started by: ksennin
4 Replies
LEARN ABOUT ULTRIX
setauth
getauth(8) System Manager's Manual getauth(8)
Name
getauth, setauth, rmauth - auth database maintenance
Syntax
getauth [username]
setauth
rmauth username
Description
The command takes as it's only argument a user name or UID. If a user name is supplied it is converted to a UID by searching through The
UID is then used to look up the users entry in the database. If an entry is found it is converted to an ASCII string with a syntax resem-
bling that of the passwd file and printed out as a single line. If no entry is found nothing is printed and an exit status of `1' is
returned.
# getauth username
1000:idvidfy8d:1920129:3600:2678400:0e:0:1000:0:00:00
The first field is the UID of the entry which is used as the key into the database. Then follows: the encrypted password, password modifi-
cation time, minimum password lifetime, maximum password lifetime, account mask, login failure count, audit ID, audit control, audit mask,
and a reserved field.
If the optional username argument is not supplied to getauth it will produce an output line for every entry in the auth database.
The command expects one or more lines from the standard input which must be of a form identical to that produced by the command. The com-
mand converts and stores these lines into the database, one entry per line, replacing any entry already existing for the given UID. By
piping the output of the command into the input of the command an expensive NOP can be produced:
# /usr/etc/sec/getauth | /usr/etc/sec/setauth
The command expects exactly one argument, the user name or UID of an auth entry to be deleted. If the entry is found it is erased and
deleted. If it is not found no action is taken and an exit status of 1 is returned.
Restrictions
Only the superuser and members of the group may read information from the auth database. Only the superuser may modify the auth database.
Diagnostics
An exit value of 0 indicates a successful operation. An exit status of 1 indicates the entry was not found on a lookup or deletion opera-
tion. Any other exit status indicates an error.
Files
See Also
getauthuid(3), getpwent(3), auth(5), edauth(8)
Security Guide for Administrators
getauth(8)