Operating System - HP-UX
1848097 Members
5354 Online
104022 Solutions
New Discussion

Re: User add information command line

 
SOLVED
Go to solution
George Chechakunnil
Frequent Advisor

User add information command line

hello Admins,

Can you please tell me what command line options are there to get the following user parameters? The things we can see in SAM--> Users and Groups -> Modify users Security Policies.

1. Password ageing policy
2. General User account policies
a)Account life time (days)
b)unsuccesful login tries allowed
c) Authorize User to Boot to Single-user State

Also what command can i use to create a user by setting these parameters?

1. Password ageing policy -> Disabled
2. General User account policies
a)Account life time (days) --> None Infinite
b) unsuccesful login tries allowed --> Customze --> 0
c) Authorize User to Boot to Single-User State --> No

Once i get the commands i hope to put in a script that can do on all servers.

Please help

Regards
George Abraham
I am like a small boy picking up pebbles in god's vast shore of knowledge --- Sir Issac Newton
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: User add information command line

Shalom George,

Section 1

1. Set in /etc/default/security not the command line.
2a. Same concept. To some degree you can effect this from the command line by -G choosing groups for which you have set policy in advance.
2b. A feature of trusted systems, requires enhanced security
2c. You can write a script to interpret the input and add users that you wish to have boot priviledges to the shutdown configuration file.

QUICK TRICK: If you have just done this in SAM you can "view sam log" change the detail setting to command only. You will see all the commands sam issues to comply with your recent requests.

The useradd man page will provide you all create options. Not all of them can be done from the useradd command line. Doing a user this way and looking at the sam command log will give you the needed commands.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: User add information command line

Shalom again George.

I hit submit too soon.

Two other things to look at:

Alternate /etc/skel configurations. You can have an alternate default covering someof your requirements in section 2. You might even be able to experiment and use an alternate version of /etc/default/security

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
whiteknight
Honored Contributor
Solution

Re: User add information command line

Hi George,


Here you go.
the commandline is provided in this technical knowledge base

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en&docId=emr_na-c01010466-2

point 3 & 4

Hope got a good points from you :-)
Problem never ends, you must know how to fix it
whiteknight
Honored Contributor

Re: User add information command line

Hi George,


Here you go.
the commandline is provided in this technical knowledge base

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en&docId=emr_na-c01010466-2

point 3 & 4

Hope to get a good points from you :-)
Problem never ends, you must know how to fix it