Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Users

Status
Not open for further replies.

chomps303

MIS
Sep 30, 2003
83
US
I create new users in SCO 5.07 by creating a tmp passwd file and run addxusers. I use this becouse I have many users at a time to add and it works great. Is there any way to have a list of user names and do a for next loop and test logins? Something like this, except this dosen't work.

for name in `cat list`
do
echo $name
login $name
done

Thanks in advance

Brandt
 
Hi chomps,

From man login: &quot;It (login) cannot be invoked except when a connection is first established, or after the previous user has logged out by sending an end-of-file (<Ctrl>d) to their initial shell.
:
:
&quot;login cannot be executed from a shell.&quot;
:

Why would you want to do that?

Theophilos.
 
In Sun or HP platform, use 'passwd -s' to show the login status. Don't know that SCO unix has this option or not. You may try to 'man passwd' for more details.

tikual
 
To test the login and password, you can try something like this:
Code:
for name in `cat list`
do
     echo $name
     telnet localhost
done


Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top