LinuxQuestions.org
Visit Jeremy's Blog.
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


Reply
  Search this Thread
Old 05-14-2012, 07:57 AM   #1
yousefzad
LQ Newbie
 
Registered: May 2012
Posts: 14

Rep: Reputation: Disabled
what is the " uausers.sh" command in Linux and how i can block a single user


Hi Everybody,

i am working with ASYCUDA System (Automated Customs Data) and using Linux Enterprise and Oracle 10g.

so there are many users and clients in my Network.
can you please let me know how i can Block a single user in order to don't connect to the network or how i can kill a single User.

"uausers.sh" is a command for that, but i am going to use more and know how to completely block a single user.

Thanks,
 
Old 05-14-2012, 08:30 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
I don't recognize "uausers.sh" but from its name and what you've written I'm guessing it is a shell script written to be used in your environment. Shell scripts are in text so you can view them (and even edit them if you know what you're doing.).

Type "which uausers.sh" to find out the location of (full path to) the script. Then type "cat <fullpathto>/uauser.sh" to see what is in it. If you don't understand it you can paste it here and we can help see what it is doing.
 
Old 05-22-2012, 04:45 AM   #3
yousefzad
LQ Newbie
 
Registered: May 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
i have two servers, Main server and Backup Server, on main server from every position i can use " uausers.sh" and its running, but in backup server i am not able to do so, i have to go to its position and run the file.
is there any possibilities to do something to run a file from every place and position?
thank
 
Old 05-22-2012, 04:48 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,443

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
As described above, simply prefix with the location/path eg if the file is in /usr/bin, then
Code:
/usr/bin/uausers.sh
Also as above, a 'shell' file is simply ASCII text, so you can/should look at it using the cmd above.
 
Old 05-22-2012, 06:20 AM   #5
yousefzad
LQ Newbie
 
Registered: May 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
thanks Chris,

the "uausers.sh" location is " /apt/utasy/uausers.sh

in the main server from every location i can call the "Uausers.sh" but in my backup server i am not able, but i have to go to the file location and open it.
in the main server it has been installed by my IT Manger and in backup server i installed my self, so now i want to know how can i do and call the "uausers.sh" from every location of my prompt.
 
Old 05-22-2012, 07:11 AM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You can define the directory in which it is installed in your PATH variable.

On the system where you can call it from anywhere do "echo $PATH" to see what the PATH variable has in it. It likely has something along the order of:
/bin:/usr/bin:/usr/local/bin:/apt/utasy

The items separated by colons are the directories (paths) where executables are searched for when you do not type the full path to the command. They are searched in the order they appear in the variables. So if you had the same command in /bin and /usr/local/bin and typed only the short name of the command it would find the one in /bin but not the one in /usr/local/bin. On the other hand if the command only exists in /usr/local/bin it would find it there after first searching for it (and not finding it) in /bin and /usr/bin.

The PATH variable is typically set in system and/or user profiles. The system profiles are things like /etc/profile, /etc/bashrc, /etc/bash_profile and the user profiles are the dot files in a user's home directory such as .profile, .bashrc and .bash_profile. Note there are different profiles for different shells - csh (C shell) uses completely different profile files. You can find out what profiles are looked for by reading the manual page of the shell (e.g. type "man bash" to see the manual for bash shell.)

You can edit one of the profile files to add the /apt/utasy to the end of the PATH= statement. Then on next login it should show it in your PATH variable (echo $PATH).

You can also quickly add a directory to an existing PATH variable by appending:
PATH=$PATH:/apt/utasy
Note that such an addition is only valid for the session in which you do it. As noted above to make it permanent you have to add to one of the profiles.
 
  


Reply


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] Printf: giving "001 002 003 004 006.... 150" in a single line dash command? Xeratul Programming 6 01-16-2011 07:00 AM
[SOLVED] "su -l user -c command" behaves differently to other Linux/UNIX GazL Slackware 6 06-30-2010 09:51 AM
Accepting single backslash "\" as a user input. sundar_r05 Linux - Enterprise 6 02-02-2010 05:29 AM
How Can I Use An "if" statement on a Single Command Line? jagooch Linux - General 4 02-10-2009 11:32 PM
"INIT: Going Single User" during boot vwagheim Mandriva 13 11-18-2005 08:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:44 AM.

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
Open Source Consulting | Domain Registration