Search Results

Search: Posts Made By: fugeulu
3,680
Posted By fugeulu
How to write bash script for lvm snapshot?
Hi Team

I am trying to put together a nice small script to mount my lvm snapshot

Here are my objectives

1 Check whether snapshot is currently mounted. If so echo umount snapshot and exit...
32,009
Posted By fugeulu
Thank you for all your post It really means...
Thank you for all your post

It really means alot to me and it gave me a good bash learning curve

One more thing is, the home directory still doesn't creates remotely by the script

here is...
32,009
Posted By fugeulu
Bang on This works for me RUID=$(ssh $i ...
Bang on

This works for me
RUID=$(ssh $i awk -F: '\$3=="'$UNIQUE'"' /etc/passwd)



One more thing is, the home directory still doesn't created remotely by the script

here is the line of...
32,009
Posted By fugeulu
Just a dum question..... What does it mean...
Just a dum question.....

What does it mean by the $ sign infront of that bracket ()

Is that another way of assign the value of ssh..... to RUID
RUID=$(ssh $i awk -F: '\$3=="'$UNIQUE'"'...
32,009
Posted By fugeulu
My hosts are all rhel 4 and 5
My hosts are all rhel 4 and 5
32,009
Posted By fugeulu
Here is what I get if I put that modificatin of...
Here is what I get if I put that modificatin of yours
RUID=`ssh $i awk -F: '\$3=="'$UNIQUE'"' /etc/passwd`
[root@GPGLNX02 test]# ./useradd.sh
awk: ==
awk: ^ syntax error


I even run it...
32,009
Posted By fugeulu
Chubler What is the reason of the escape(\)...
Chubler

What is the reason of the escape(\) on $3 on the following option you suggested
RUID=`ssh $i awk -F: '\$3=="'$UNIQUE'"' /etc/passwd`
32,009
Posted By fugeulu
How to write bash script for creating user on multiple Linux hosts?
You're right
DGPickett


$1 is the uid value

Chubler_XL
Can you please clarification why you have both double and single quotes on
"'$UNIQUE'"
RUID=`ssh $i awk -F: '\$3=="'$UNIQUE'"'...
32,009
Posted By fugeulu
Thanks madeingermany That is another neat...
Thanks madeingermany

That is another neat way of doing it, unfortunately

when I run it twice, it doesn't give out the output that the user or uid exist
[root@GPGLNX02 test]# ./useradd-1.sh...
32,009
Posted By fugeulu
How to write bash script for creating user on multiple Linux hosts?
Thanks DGPickett

I am new in bash, and I didn't totally understand what you're trying to say.

Do you mean, change the for loop to while loop, scp the script to the remote server and run it?

...
32,009
Posted By fugeulu
How to write bash script for creating user on multiple Linux hosts?
I wonder whether someone can help me with what I'm trying to achieve

Basically, the objective is one script to create new user on more than 70 linux hosts if required.

Everything works apart...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 09:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy