06-07-2013
Create multiple users with individual passwords to users
hi,
i am new to shell scripts
i write a shell script to create multiple users but i need to give passwords to that users while creating users, command to write this script
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I am the administrator for a large network of HP/UX servers, about 100, this will be growing to over 200 in the next 18 months, part of my duties are to change the root passwords on these machines once month... which is a pain. I have written a script that will generate random passwords for me and... (3 Replies)
Discussion started by: PJolliffe
3 Replies
2. UNIX for Dummies Questions & Answers
hi, to do a su - user, we need to know what are the users...
so in unix
1) which file to see the list of users, passwords? (2 Replies)
Discussion started by: yls177
2 Replies
3. Shell Programming and Scripting
Hi,
I am trying to write a shell script which execute certain commands within certain folders in each user's home directories
I started off with a bash script -
#!/bin/csh -f
su -l cvsusr1
cvs -d /home/cvsadm/repository status
But the shell script finishes immediately after... (1 Reply)
Discussion started by: rupa_lahiri
1 Replies
4. Solaris
Hi All,
How to restrict the NIS users not to change their passwords in for NIS users??
and my NIS user is unable to login to at client location what could be the problem for this ?
Any body can help me. Thanks in advance. (1 Reply)
Discussion started by: Sharath Kumar
1 Replies
5. UNIX for Advanced & Expert Users
Hello,
I have an AIX 5.3 system. I want to check users to see whether there are users with blank passwords but i would prefer to do that without checking /etc/passwd or /etc/security/passwd files.
Also while i was searching the web for a solution i noticed that many people refer to /etc/shadow... (2 Replies)
Discussion started by: omonoiatis9
2 Replies
6. Solaris
* Can we create multiple users with same UID?
* Can we give root permissions to normal user like admin.s ? If YES give me full details (syntax of sudo/RBAC) (14 Replies)
Discussion started by: Navkreddy
14 Replies
7. Shell Programming and Scripting
Hi, guys. I need help on some expect problem.
#!/usr/bin/expect
set user
set password
set newuser
spawn telnet x.x.x.x
expect login*
send “root\r”
expect Password*
send “123546\r”
send "useradd $newuser\r"
send "exit\r"
interact
I can add 1 user using expect script, but how do I... (1 Reply)
Discussion started by: alhazerd
1 Replies
8. UNIX and Linux Applications
Is it possible to use {SHA} with ldappasswd? I didn't find responsible option in manual page and doc (1 Reply)
Discussion started by: urello
1 Replies
9. Red Hat
Hi,
I have problem with a script, it was working for 6 month and suddenly I started getting strange expire times
example:
# chage -l wXXp
Last password change : Oct 28, 2014
Password expires : Nov 27, 2014
Password... (3 Replies)
Discussion started by: redmansas
3 Replies
10. UNIX for Beginners Questions & Answers
Hi Team,
I got a requirement to send a mail to the individual users of a unix server about their respective groups. can some one help me to provide the script as I am unable to write that.
I tried with below lines but I come out with errors.
cat /etc/passwd | awk -F':' '{ print $1}' |... (6 Replies)
Discussion started by: harshabag
6 Replies
LEARN ABOUT FREEBSD
newgrp
NEWGRP(1) BSD General Commands Manual NEWGRP(1)
NAME
newgrp -- change to a new group
SYNOPSIS
newgrp [-l] [group]
DESCRIPTION
The newgrp utility creates a new shell execution environment with modified real and effective group IDs.
The options are as follows:
-l Simulate a full login. The environment and umask are set to what would be expected if the user actually logged in again.
If the group operand is present, a new shell is started with the specified effective and real group IDs. The user will be prompted for a
password if they are not a member of the specified group.
Otherwise, the real, effective and supplementary group IDs are restored to those from the current user's password database entry.
EXIT STATUS
The newgrp utility attempts to start the shell regardless of whether group IDs were successfully changed.
If an error occurs and the shell cannot be started, newgrp exits >0. Otherwise, the exit status of newgrp is the exit status of the shell.
SEE ALSO
csh(1), groups(1), login(1), sh(1), su(1), umask(1), group(5), passwd(5), environ(7)
STANDARDS
The newgrp utility conforms to IEEE Std 1003.1-2001 (``POSIX.1'').
HISTORY
A newgrp utility appeared in Version 6 AT&T UNIX.
BUGS
For security reasons, the newgrp utility is normally installed without the setuid bit. To enable it, run the following command:
chmod u+s /usr/bin/newgrp
Group passwords are inherently insecure as there is no way to stop users obtaining the password hash from the group database. Their use is
discouraged. Instead, users should simply be added to the necessary groups.
BSD
February 8, 2013 BSD