10-06-2001
Don't want to use useradd command to create a new user
I am doing manual addition of accounts. Actually I am writing a script and I am working on RedHat7.1 system. What I am trying to do is run the script and pass all the values of the username password and group as command line parameters. Now what I am trying to do is after passing the initial password I want the account to be activated with that password. Because if you simply edit the passwd file and add the username, password and other information when you test the account it does not recognize the account and then as a root user you have to go and enter the password again and then it gets written to the shadow file in encrypted form(even if you user command "pwconv" does not write the password to the shadow file in the encrypted form). P;us I can't leave the acconts open either. To create 500 account or more It will take me long a time to create those accounts. I just want to automate those password writing to the shadow file without having to go through this command
passwd <username>
enter new password in Unix ******
So, if anyone knows how can I do this through the script please let me know.
regards
-Iftikhar
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Can any body help me to write a scripting program for entering a password at run time with out user interaction. (1 Reply)
Discussion started by: kumar_d
1 Replies
2. UNIX for Dummies Questions & Answers
I would like to change the password requirements for all our AIX 5.2 logins but am having trouble finding a place where I can set the rules for everyone at the same time. I know I can go user by user in smit passwords but is there a way to create rules for everyone at the same time?
Thanks,... (2 Replies)
Discussion started by: drathbone
2 Replies
3. UNIX for Advanced & Expert Users
hi all
i am writing a script to create user and group from the input given to script
for eg. script needs to values
1. mode - 1 or 2
2. id - if mode is 1 then id should be 2 char like x1 / v1 / v2
if mode is 2 then id should be 1 char like x / v / e
from these to values group is... (1 Reply)
Discussion started by: zedex
1 Replies
4. Solaris
Hi:
Could I set the:
- Login Time-out Interval
- Password History Count
- Lockout Duration
- Lockout Threshold
for user account in Sun Solaris 5.8.
Thanks for your help (6 Replies)
Discussion started by: mlsun
6 Replies
5. UNIX for Advanced & Expert Users
Hi,
I have installed open ldap according to the order from this video:
YouTube - bowendenning's Channel
sudo apt-get install slapd
sudo apt-get install ldap-utils
sudo apt-get install phpldapadmin
The installaion was good.
However it did NOT ask from me any password.
After I enter to... (0 Replies)
Discussion started by: programAngel
0 Replies
6. AIX
In AIX 5.3 tech level 11:
I want to setup a default password policy to have at least one
of each of the following: alpha character, numeric character, and "special"
character ("!", "&", etc).
The smitty Security and Users --> Passwords --> System Password
Policy screen only offers "MIN... (2 Replies)
Discussion started by: kikwit_phil
2 Replies
7. Solaris
Can anyone kindly explain to me the meaning of the default values of the code below please?
Thank you very much
#MINDIFF=3
#MINALPHA=2
#MINNONALPHA=1
#MINUPPER=0
#MINLOWER=0
#MAXREPEATS=0
#MINSPECIAL=0
#MINDIGIT=0
#WHITESPACE=YES (1 Reply)
Discussion started by: cjashu
1 Replies
8. SuSE
Hi,
I am setting password complexity in SLES 11. I am able to do most of things
pam-config -d --pwcheck
pam-config -a --cracklib
pam-config -a --cracklib-minlen=8
pam-config -a --cracklib-dcredit=-1
pam-config -a --cracklib-ocredit=-1
pam-config -a --pwhistory
pam-config -a... (1 Reply)
Discussion started by: solaris_1977
1 Replies
9. Solaris
Hi All,
I have a problem setting the password when I have to create a user and password as detailed below.
username : gaacj01 password : oshopp01
username : gaacj02 password : oshopp02
username : gaacj03 password : oshopp03
username : gaacj04 password : oshopp04
username : gaacj05 ... (17 Replies)
Discussion started by: kittigolf
17 Replies
10. HP-UX
I need to set password compliance for some servers in my company.
However, the requirements are that we need to set different password policies for 3 different user groups within the company. These are :
System Users: i.e root, etc
Batch/Application Users: oracle, bscs, etc
Standard User:... (0 Replies)
Discussion started by: anaigini45
0 Replies
vipw(8) System Manager's Manual vipw(8)
NAME
vipw,vigr - edit the password, group or shadow file
SYNOPSIS
vipw [-g|-p|-s]
vigr [-g|-p|-s]
DESCRIPTION
vipw/vigr edits the passwd,group or shadow file after setting the appropriate locks to prevent file corruption. vipw edits per default the
/etc/passwd file, vigr the /etc/group file. Extended attributes (like ACLs or security attributes) are preserved.
ENVIRONMENT
EDITOR If the environment variable exists, the editor specified by this variable is used instead of the default vi(1).
OPTIONS
-g, --group
Edit /etc/group.
-p, --passwd
Edit /etc/passwd.
-s, --shadow
Edit /etc/shadow.
-u, --usage
Print a usage message and exit.
--help
Print a more verbose help text and exit.
Print version information and exit.
FILES
/etc/group - group account information
/etc/passwd - user account information
/etc/shadow - shadow account information
SEE ALSO
attr(5), passwd(1), passwd(5), shadow(5), vi(1)
AUTHOR
Thorsten Kukuk <kukuk@suse.de>
pwdutils October 2003 vipw(8)