08-20-2010
Setting alias for a user - Linux ubuntu
Hi
i have a user "SYSTEM"
i want to set the below command in his .profile for an alias:
who | awk '{print $1}'| sed '/SYSTEM/d' | sed '/root/d' |xargs -i pkill -u {}
i tried as below:
alias stop = " who | awk '{print $1}'| sed '/SYSTEM/d' | sed '/root/d' |xargs -i pkill -u {}"
whenever i login as this user and type "stop"
i get the below:
pkill: invalid user name: joyce pts/2 Aug 19 00:34 (jm4tvk1.com)
pkill: invalid user name: joyce1 pts/3 Aug 19 00:35 (jm4tvk1.com)
Any idea why this is failing? Also i added this user in /etc/sudoers
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I watched this done a long time ago, but cannot find it anywhere. I need to alias the boot device "disk" to /sbus@7,0/QLGC,isp@0,10000/sd@c,0
I think I need to set "use-nvramrc?" to true, and then create an alias within the nvramrc to point disk to the boot disk, but this is the step I cannot... (3 Replies)
Discussion started by: 98_1LE
3 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
I am setting bash as my working shell in my .profile file.
So I have written a line :
bash
as the list line in my .profile
I want to use alias as follows:
alias me='who am i'
When i log in, as expeced I enter the bash shell but alias doesn't work.
Is it because the alias is defined... (1 Reply)
Discussion started by: VENC22
1 Replies
3. Red Hat
Hi Everyone,
I am trying to set up alias the only way I now how, buy making entry into .bashrc file.
The entry I made is
alias ll='ls -lrt'
It is not working as I expect. When I enter "alias" at the command line I get the following.
$ alias
alias l.='ls -d .* --color=tty'
alias... (2 Replies)
Discussion started by: jxh461
2 Replies
4. UNIX for Dummies Questions & Answers
I want to install ubuntu on a seperate hard drive. I have two 500gb sata drives with XP on sata 0,0 and like to install ubuntu on the other sata 1,1.
A few questions:
Will this work?
Can I unplug the XP drive and boot up with ubuntu to 1,1?
If that works, how can I boot to... (6 Replies)
Discussion started by: dwainbar
6 Replies
5. Solaris
Hi All,
I need some information on 'Alias' setting in SUN SOLARIS.:confused:
Q1. I want to know how can i set my alias here.
Q2. How to view all set 'ALIAS' for me. (say /home/jdash user)
Q3. Can i modify the set 'Alias' for me or for whole environment.
Q4. Is Alias setting can be change... (2 Replies)
Discussion started by: jdash.ps
2 Replies
6. Linux
I have installed user-mode linux kernel in Ubuntu 10.10 with the help of Synaptic package manager.
But I'm not getting how to run it.
If we install it manually, we've to run it using the executable binary file.
But here, I'm unable to locate any such file.
Please help....
Thanking You....
... (0 Replies)
Discussion started by: rohitadeshmukh1
0 Replies
7. UNIX for Dummies Questions & Answers
I tried to set up some alias in my .profile to save typing. One of the alais i tried to set up is
alais test='echo 123$acct54679abc'
But when I typed in test in the command line. The echo only dispaly 123 and truncated all the string starting from the $ sign. Is there any way to display the... (6 Replies)
Discussion started by: oht
6 Replies
8. Shell Programming and Scripting
I want to set an alias to connect to sqlplus and also run a command while it it logs in.
How can I do that? (4 Replies)
Discussion started by: som.nitk
4 Replies
9. Solaris
Trying to figure out the best method of security for oracle user accounts. In Solaris 10 they are set as regular users but have nologin set forcing the dev's to login as themselves and then su to the oracle users.
In Solaris11 we have the option of making it a role because RBAC is enabled but... (1 Reply)
Discussion started by: os2mac
1 Replies
10. Shell Programming and Scripting
Hello,
I'd like to have an alias to view some processes sorted:
I have:ps -ef | grep pmon | awk -F" " '{ print $8" "$0 }' | sort | cut -d" " -f2- | grep -v "grep pmon" It doesn't work, however, if I put it as alias because on acutes insize awk:alias pmon='ps -ef | grep pmon | awk -F" " '{ print... (4 Replies)
Discussion started by: JackK
4 Replies
LEARN ABOUT OPENSOLARIS
alias
alias(4) File Formats alias(4)
NAME
alias - alias table file of encoding names
SYNOPSIS
/usr/lib/iconv/alias
DESCRIPTION
This file contains the alias table of encoding names for iconv_open(3C).
The format of the alias table is as follows:
"%s %s
", <variant encoding name>, <canonical encoding name>
The string specified for the variant encoding name is case-insensitive. A line beginning with '#' is treated as a comment.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO
iconv(3C), iconv_close(3C), iconv_open(3C), attributes(5)
SunOS 5.11 2 Oct 2001 alias(4)