Visit Our UNIX and Linux User Community


global password settings


 
Thread Tools Search this Thread
Operating Systems AIX global password settings
# 1  
Old 10-16-2007
global password settings

Hello, we are making password setting changes effective for all users on an AIX 5.2 system. Specifically requiring users to use at least one special character in their password. Is there a way to make this change effective for all users in one place, ie the /etc/security/users file? I made the change in the users file and then went into smit users and viewed the setting for the user, but the change was not their. Any suggestions on the best way to accomplish this? Thanks
# 2  
Old 10-16-2007
Quote:
Originally Posted by zuessh
Any suggestions on the best way to accomplish this?
I'm not quite sure, what you want to do, but i suppose, you want to enforce certain rules for passwords. This is done individually by using the "chuser" command, where some restrictions can be forced onto individual users:

chuser <...some clauses> username

clauses could be:

minlen=<int> => minimum length of password in characters
minalpha=<int> => minimum number of alphanumeric characters in pw
minother=<int> => minimum number of other (non-alpha) chars in pw
maxrepeats=<int> => maximum number of consecutive identical chars
mindiff=<int> => minimum of different characters

and so on... There are also possible restrictions on how many passwords mut be used before a pw could be reused, a maximum age for passwords and the like. Issue "man chuser" for a detailed explanation of which clauses there are and what they do.

All these password-related clauses modify a file named /etc/security/user, where these changes are stored. You can edit this file with any ASCII-editor (its a stanza file) and change the "default"-stanza to modify the systemwide restrictions instead of modifying it for each user separately. Individual user settings override these settings.

Example:

chuser minlen=8 minother=1 john

will change the properties of the user john so that john will have to use passwords at least 8 characters long and with at least 1 non-alpha character in it. "abcd!efg" would be such a password, "abcde123" would not.

bakunin
# 3  
Old 10-16-2007
Hi,

You are on the right track with /etc/security/user. However, I don't think you should modify this file by hand.

You could user the "chuser" command in a "for" loop to accomplish what you're trying to do. You can either create a list of users to be changed in a file, or in my case since all of my userid's start with e0 I just created my list as part of the for loop.

Here's the for loop I used.

Code:
for user in `cat /etc/security/user | grep ^e0 | awk -F":" '{ print $1 }'`
do
chuser minother=1 $user
done

# 4  
Old 10-16-2007
And what would be the reason for not modifying the file directly? User information is not being stored in the ODM and chuser does nothing else than modifying this file.

It is, quite to the contrary, ADVISABLE to change the file directly, especially the default-stanza, because this will make sure newly added users will have the same restrictions as the old ones. Otherwise you will have to run your command over and over again.

Btw. to build a list of users do NOT grep the /etc/security/users file but use the "lsuser" command. For example, to get a list of all users with their userid issue:

lsuser -ac id ALL | grep -v '^#'

bakunin
# 5  
Old 10-26-2007
If you don't want to edit /etc/security/user directly, you can use the following:
Code:
chsec -f /etc/security/user -s default -a minother=1


Previous Thread | Next Thread
Test Your Knowledge in Computers #381
Difficulty: Medium
Solaris 9 is registered as UNIX 03 compliant on 32-bit and 64-bit x86 (X86-64) and SPARC systems
True or False?

10 More Discussions You Might Find Interesting

1. Solaris

Date and time change in global and non global zone

Hi, If I change date and time in global zone, then it will affect in non global zones. During this process what files will get affect in non global zones and which mechanism it's using to change. gloabl zone:Solaris 11.3 X86 TIA (1 Reply)
Discussion started by: Sumanthsv
1 Replies

2. Solaris

Global and non-global zone resource sharing - tricky

hi all, Just a simple question but i cant get the answers in the book - In my globalzone , assuming i have 4 cpus (psrinfo -pv = 0-3), if i set dedicated-cpu (ncpus=2) for my local zone Is my globalzone left with 2 cpus or still 4 cpus ? Does localzone "resource reservation.e.g. cpu in... (6 Replies)
Discussion started by: javanoob
6 Replies

3. AIX

default settings of security password in AIX

Hi Guy's Just I want to know the default settings of security password in AIX there is some changes happened in my machine when I try to change my password I'm getting this message Changing password for "root" root's New password: a minimum of 1 elapsed week between changes.... (1 Reply)
Discussion started by: Mr.AIX
1 Replies

4. Solaris

How to access ENV variables of non global zones in global zone???

Hi Guys, My requirement is I have file called /opt/orahome/.profile in non global zone. PATH=/usr/bin:/usr/ucb:/etc:/usr/sbin:/usr/local/bin:/usr/openwin/bin:. export PATH PS1="\${ORACLE_SID}:`hostname`:\$PWD$ " export PS1 EDITOR=vi export EDITOR ENV=/opt/orahome/.kshrc export ENV... (1 Reply)
Discussion started by: vijaysachin
1 Replies

5. Solaris

Is there two different kernel`s running in global and non global zone?

Hi All, I want to know for non global zone there will be different kernal running? (1 Reply)
Discussion started by: vijaysachin
1 Replies

6. Solaris

How can we copy a directory from Global to Non-global zone?

Hi All, How can we copy a directory from global zone to non-global zone using SCP command? (8 Replies)
Discussion started by: vijaysachin
8 Replies

7. UNIX for Dummies Questions & Answers

I.T. auditor needs help with UNIX password settings

Hi, I'm an I.T. auditor and have to validate the password rules/settings (complexity rules, minimum password length, special characters, etc.)within UNIX for a client. In MS AD, i simply ask for a screen shot of the password settings. How can i do this in UNIX? help much appreciated. Also, how can... (1 Reply)
Discussion started by: gosmartyjones
1 Replies

8. UNIX for Advanced & Expert Users

Password settings

Good afternoon/afternoon/evening, I have a solaris 8 machine that if I lock the machine and return I can just press enter and it will log back in, this happens with all users on just this machine. Is there a config file or command to put the password in place? regards will (4 Replies)
Discussion started by: Mr Pink
4 Replies

9. UNIX Desktop Questions & Answers

list the password settings for all the users

Hi!! How can I list the password settings for all the users?? Best regards (3 Replies)
Discussion started by: irasela
3 Replies

10. UNIX for Dummies Questions & Answers

Password Settings

Is there an easy way to spit out a screen with all the password setting parameters set out? For example: MINWEEKS=1 MAXWEEKS=8 etc. I'm looking for a way to have all the settings consolidated on a report for inclusion in policy documents. (4 Replies)
Discussion started by: Hoju
4 Replies

Featured Tech Videos