10-20-2007
setting password for user using useradd?
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 generated as : abcxr / abcvr
and user name as : abconlx1 / abconlv2 / abconle
i have written a script that will run for sun / hp / aix but the only problem is that setting a password for the user now i am asking user to change password once the user is created with passwd <user-name> command.
is there any way that i can set default password ??
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Can any one tell me if i dun want using 'useradd' command to add new user, it is have any command i can use to add a new user?and any extra step needed for my local environment? (3 Replies)
Discussion started by: foong
3 Replies
2. UNIX for Advanced & Expert Users
Helo ,
I m using linux pam library for user and its password authentication.
I m creating new user and giving its password.I m giving password of 10 characters.now when I login in as that newly created user its ask me
$ su - ram
Password:
You are required to change your password immediately... (12 Replies)
Discussion started by: amitpansuria
12 Replies
3. 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
4. Ubuntu
Hi, I need to create a user from a bash script so i have to use useradd. The problem is that when i create a user with:
useradd -d /home/sample -m sample
after i login with that user I have no history in bash, path do not appears, i can't use arrows and so on. When I use adduser everything is... (5 Replies)
Discussion started by: ktm
5 Replies
5. HP-UX
On hpux 11.23, useradd does not support the -p
Looking for ideas to script-o-magically add an user with a password.
Ideally the password should be hashed in the script.
Thanks. (2 Replies)
Discussion started by: nbh
2 Replies
6. Linux
Hi,
I am new in linux. Please help for create new user and also need to give sudo access in linux box. Please help me
Now i am having new access
Thanks,
Mani (2 Replies)
Discussion started by: Mani_apr08
2 Replies
7. UNIX for Advanced & Expert Users
Hi,
I am using Solaris 10 OS and Bash shell.Is there any way can we automate User creation and setting passwords through a script or any freeware tool.
Advance thanks for your response. (1 Reply)
Discussion started by: muraliinfy04
1 Replies
8. Solaris
Trying to figure out the best method of security for oracle user accounts. In Solaris 10 they are set as regular users but have nologin set forcing the dev's to login as themselves and then su to the oracle users.
In Solaris11 we have the option of making it a role because RBAC is enabled but... (1 Reply)
Discussion started by: os2mac
1 Replies
9. UNIX for Beginners Questions & Answers
Hello everybody,
I need to modify 200 files using a patern matching, I would like to do it with sed but it's not working with the following syntax:
sed -e 's/DATABASE_PASSWORD.*oldpass/DATABASE_PASSWORD__', 'newpass/g' config.php
need to find:
define("__DATABASE_PASSWORD__", ... (6 Replies)
Discussion started by: dco
6 Replies