General :: Script Question: Create A Shell Script In Kde To Log In On A Server With Ssh?
Jan 31, 2011http://www.linuxquestions.org/questi...=1#post4243321
View 1 Replieshttp://www.linuxquestions.org/questi...=1#post4243321
View 1 RepliesI tried to create logfile for the below shell program but i was not able to get log file,can anyone help me for the below program to create a log file for the shellscript.
View 12 Replies View RelatedI have Disk /dev/cciss/c0d1: 599.9 GB, unallocated on CentOS release 5.4 .
I need to create about 30-40 LVM's worth 500GB as raw devices for sybase . is there a way to script it or anyone already has it ?
The problem is that each time we need to do fdisk /dev/cciss/c0d1 and enter the partition no to create a new one .. how to overcome that problem and automate it in a script ?
I am trying to create a shell script similar to ls, but which only lists directories. I have the first half working (no argument version), but trying to make it accept an argument, I am failing. My logic is sound I think, but I'm missing something on the syntax.
Code:
if [ $# -eq 0 ] ; then
d=`pwd`
for i in * ; do
if test -d $d/$i ; then
echo "$i:"
code....
I would like to create the shell which would support the LS command in C++. And any way to change the command prompt.
View 1 Replies View RelatedI am a complete newbie to linux. I am currently taking a course at Devry university called netw240. I am in my 2nd week of class and am required to turn in a paper at the end of the coures were I write an automated shell script. I am currently using Fedora 12 on a Vmware player and want to try to write a script that automates the process of Logging user login activity to detect unauthorized remote access attempts.I am looking for pointers on were to start, examples, ect.. anything that can get me started. Also, is this type of script to much for a beginner?
View 11 Replies View Relatedhow can I create a shell script for ssh where I don't have to type the password manually?I have learned expect command and I have tried multiple examples, but it didn't work.
View 7 Replies View RelatedI am using Linux on my system. I don't have gui for my system, only console is there.
I have some task to create a menu box window using dialog in shell scripting.
I have to take input from user & save it in a file.
But this should like html form as e.g.
Name - .....................
email id - ..................
phone - ......................
location - ...................
Submit Cancel
Such window should be displayed on console using dialog & then user will enter his information there as Name,email id, phone,etc & submit it, then it gets saved to a file. Here submit & cancle are buttons. I have to do it in bash shell scripting. Or give me some examples like the above with shell script code.
I was trying to create a shell script which will automatically login to the server 192.168.1.7 and checks if a user exists there or not, if it doesn't exist then it should create the user.I have very little idea about shell scriptThis is what I tried:Quote:
#!/bin/bash
pass="sacharje"
ssh 192.168.1.7
Now, how to pass that password automatically to the ssh when it asks for the password? (I can't use public key authentication here)
An external service I dont manage pushes mediafiles into a shared directory on my server. I need to move these files into their correct directories automatically. The problem is that if I run my script as a cronjob once every 3 minutes, I notice that the script copies files which are still on their way into my server. So I need to figure out how to have the script check that the files are complete (done downloading) before the script moves the files. This is what I got so far:
Code:
#!/bin/sh
# Script by proximity 280709.
# Locate correct directory
[code]....
I bought a web hosting account(cPanel) and I want to create my own name server(ns1 and ns2.mydomain.com). So when I want to host addon domain, I can point them to my name server instead of hosting company name server.
View 10 Replies View RelatedHow do I create a new mysql user and a mysql database at the shell prompt?
View 1 Replies View RelatedI am using ubuntu10.04-server 64bit AMD with fluxbox. After I ran Matlab in a shell (without GUI) the shell does not display characters anymore, but will execute any command, I just can't see the characters that I'm typing.. I use aterm and xterm, does anybody know why that is, am I missing a package?
View 1 Replies View Relatedi got to build my own linux shell for my project
View 5 Replies View RelatedI decided to try and find a home inventory application. I found one called "Attic Manager" that works in Ubuntu. [URL]
The instructions are to run it from the terminal. That's ok for once and a while, but a pain if used regularly. So I tried to set up a launcher for it. I couldn't seem to get it to work. In the command, I simply put in the path and file name, but can't seem to get it to work.
I would like to create some aliases for bash shell. On other Unix/Linux machines I have done this using the alias command like this: alias rm rm -i
When I type that into a terminal on Ubuntu, it looks like alias is not installed. I get this:
bash: alias: rm: not found
bash: alias: rm: not found
bash: alias: -i: not found
I tried adding the alias to .bashrc instead, but then I get the same error message every time I start terminal. Just for fun I tried apt-get install alias, just to see what would happen, and it installed something called libperl-alias instead, and alias still doesn't work.
How do I create a user account in a shell script? I know this may sound n00bish to you, but I know it's more than just mkdir-ing the home directory and subdirectories.
View 7 Replies View RelatedI need to add something to an existing shell script that will check whether a remote server is up or not.basically (but I can't figure it out) :-
if [ -the server to check- ] ; then
echo "Server is Up"
else
[code]....
I came across this script a while back that i found. What i want to do is edit the script to create a default web page in /var/www/html a new user is added through the script.What the script does now is adds a user and sets a password for the user. What possible way (either through a combination of python or c or some other language) could i add to the shell script to do this? I've tried just dointhe command to touch index.html /var/www/html but it puts it on the desktop. Here's the script....
Code:
#!/bin/bash
# Script to add a user to Linux system
[code]...
I want to connect to an FTP server from the Linux command line. The server is configured behind a proxy.
If I call:
echo $ftp_proxy
I get a result like this:
abc.def.ghi.jkl:8080
If I call:
ftp -pn $ftp_proxy
I get a unknown host error.
How can I connect to the FTP server using the Linux command line?
delete a file on a remote server using shell scripting.
View 14 Replies View Relatedfrom nmap localhost | grep mysql command i will come to know whether mysql server is running or not.my problem is i want to test whether mysql server is running or not in shell script and if it is running i need to tell the user to stop the server to run the shell script.
View 3 Replies View RelatedI was planning on using my VPS to grant some of my friends shells. The problem though is that I don't want them doing crazy stuff on it, like using up all my RAM or disk space. I would like to limit them to a very small 25 mb disk space, and allow them only certain application in /usr/bin like python perl irssi screen etc. I do NOT want them to be able to cd out of their home directory. I really want this to be setup like the shell provider SHellium. I can setup the FTP and SSH stuff myself.
View 3 Replies View RelatedI would like to develop a shell script that would automatically run a backup program and then shutdown the computers, but I do not know the first thing about script development or even writing scripting.
View 2 Replies View RelatedMACHINE: HP Proliant DL260G5OS: SLES 11 SP1kernel: Linux xserver 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/LinuxIt is used as remote xserver in a LAN.I have configured /usr/lib/restricted/bin/.rbashrc with some environment variables but when the users logon in the system finally is executed $HOME/.bashrc and some environment vars are overwritten.
View 2 Replies View RelatedHow do I create a launcher/shortcut on Gnome desktop, which starts a Terminal window and executes a shell script?The script should execute as if I started the script manually, i.e. if I abort the script by pressing CTRL + C, the script should terminate but the terminal window should remain on screen.If I create the shell script launcher/shortcut using the �straight forward �Create Launcher� method�, the terminal window also closes when I hit CTRL + C
View 8 Replies View RelatedI was wondering if there would be a way for me to copy the contents of a shared folder that's running on an XP system using shell script. Actually, there are two shared folders that I want to do this with. I want to be able to launch the script and automatically copy all the contents of each folder into two separate folders on my ubuntu desktop. For example;
Lets say that I have Shared Folders A1 and A2 on my networked XP system and I have Folders B1 and B2 on my Ubuntu desktop. I want the script to automatically copy the contents of A1 into B1 and likewise for A2 and B2. During the copying, I want the script set up such that any pre-existing files in the B1 & B2 folders will automatically get overwritten by the ones copied from A1 & A2.Is there any possibilities of me achieving this?
I have a shell script that need to create some files:
1) backup files of user passed in file ( that will be written by this shell ).
2) temp files that the shell will create and later delete/remove.
This shell script will be used from my local dir ( I am not a super or a sysadmin ). Users of this shell will call this script to run on their local files in their respective directories. When my script runs, it errors with the following:
cp: cannot create regular file `./listfile.txt.backup': Permission denied
/home/myUser/tools/myShellScript: line 12: listfile.txt: Permission denied
for the temp I was able to avoid this error by creating the temp file in the /tmp directory. All I want is for this shell script to run, create/modify/backup files in user's local dirs.
The user dir has the following permission:
drwxr-xr-x testDir
the file that needs to be backed-up has:
-rw-r--r-- listfile.txt.
I want to create a Ptr record on the Dns server. Dns server is Fedora Core release 1 (Yarrow). And We have been using zone files. How can I create a Ptr record for an ip address on the Dns server?
View 2 Replies View RelatedI would like to boot any PC and make it work as an NFS Server. I like the concepts of liveCDs as they usually have drivers to recognize current and prior hardware to some extent. However, I do not need any GUI or any other services/applications; only what is required to run the NFS server and possibly copy/move files between exported folders from the command line. Can a liveCD be modified with a script to boot up as an NFS Server based on the following list? How do go about creating a bootable NFS Server based on the following list?
The NFS Server should do this upon boot:
- Check for NIC - eth0(?)
- if not present, stop booting with error message.
- if present, assign a specific IP address, mask, gateway.
[code]....