LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 12-02-2014, 01:36 PM   #1
madhumithamohan
LQ Newbie
 
Registered: Jul 2011
Posts: 16

Rep: Reputation: Disabled
Need help with modifying the script to login as different users in the same server


Hi

I have wrote the below script to delete old files.

But i need help in modifying it in a way that the script can login as different users in the same server.

My server has different domains and each owned by their respective application id.

This script has to be run seperately for every domain in the same server,which is not effective.Hence i want to modify in a way that the script can login in as all app id users and perform the deletion.

wlmkone@palio$ cat script3.ksh

#!/bin/sh

output=$(df -k /prod/msp/logs | tail -1 | awk '{print $4}' | sed 's/%//g'
echo $output
if [ "$output" -gt "70" ]; then
find /prod/msp/logs ! -name "STOPMASTER*" ! -name "STARTMASTER*" -type f -mtime +1 -exec ls -t {} \;
fi

wlmkone@palio$


Note: Here wlmkone is one of the application ids.The server has 6 different applications like this.
 
Old 12-03-2014, 08:46 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
It'll be the same answer as your other post http://www.linuxquestions.org/questi...er-4175527108/
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Need help with modifying the script to login as different users in the same server madhumithamohan Linux - Server 1 12-04-2014 12:35 AM
Tomcat 6.0 on Linux, after modifying tomcat-users.xml still cannot login. cuian01 Linux - Newbie 1 01-28-2010 04:45 AM
Executing perl script from all users login stg_in2009 Linux - Software 3 11-06-2009 02:16 AM
Need help modifying users profile to use bash -r at login tljacobs Linux - Security 4 03-01-2009 03:09 PM
Cannot login as ROOT at the Server but can login using other users, John Teng Linux - Newbie 1 06-01-2008 02:10 AM


All times are GMT -5. The time now is 01:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration