See if you have the command newusers on the target o/s. It's in some versions of linux like redhat. It allows creation of users using a file. I would try ssh without expect if that is available to you.
This User Gave Thanks to blackrageous For This Post:
HI all
i need to connect to about 900 cisco routers and switch to do some configs changes. the issue i am having is that half the devices have one set of username and password and the other half have another username and password. From expect or bash script i can ssh into a device and make... (1 Reply)
Dear All,
I am trying to write a Unix Script which fires a sql query. The output of the sql query gives multiple rows. Each row should be saved in a separate Unix File.
The number of rows of sql output can be variable. I am able save all the rows in one file but in separate files.
Any... (14 Replies)
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 (1 Reply)
hi, I need to switch users in a script
I'm newbee to expect
I wrote two files
1 sudo.exp, since su4098 is used as root in my laptop
#!/usr/bin/expect
spawn su su4098
expect *Password:*
send mypsw\n
interact
2 test.sh
ls
./sudo.exp
tcpdump -i wlan0
su esolve
ls
however, in... (1 Reply)
* 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)
I new to unix and I'm using a HP UX and I'm logging in as user: root. I wish to create new users by using the 'useradd' command.
When I keyed in' useradd -u 101 -g group john', the reply was 'Group group specified with -g does not exist'.
I've read the man page on useradd and I still don't... (8 Replies)