I have a situation, where some script (running background) need to use the 'write' command and get a text to appeared on any screen of some particular user.
Like:
But I surprisingly realized, that if a person logged under any other name and after that uses the 'su' command to log in as the 'user1', he will not be reachable by the 'write' command!
Is there any other way to send a message to anyone who currently logged as 'user1', even by 'su'?
Last edited by alex_5161; 02-02-2009 at 05:41 PM..
Hi,
The write program writes text to a users tty. That is what the OP was talking about.
Yo should use the who command to figure out what terminal/xterm/whatever tty the user is using. The root user more often than not has messaging turned off by default. Use the mesg command to configure those rules.
And have a look at "man write" and "man mesg"
/Lakris
EDIT:
sorry, I guess I got carried away... I usually do an "ssh -X user@localhost" because I'm lazy and want X-forwarding, and then I always get a clean and obvious login. su'd users don't show up in who. So, I would find a way , with for example ps axjf to find the user You want to reach, find the tty, and find the owner of that tty...
this is very crude but I guess You get the idea...
and in my other xterm it shows up as
It is not a solution to my situation - to have anything appeares on user's loggin!
First - I need it displayed right away (assuming, someone use that log name - user1 - in every given point of time)
Second - the 'user1' is not logging on - someone uses 'su' to use that account for some tasks!
The 'write' command perfectly works out what I need - it is showing a message on first found screen (tty) for a requested user, BUT it is fooled by the 'su' loggin.
Whell, it is a production control task that should inform about itself in some condition.
And you can guess, in different time different people performe 'production control' duties.
I do not need to have it write for a particular individual, but to an anyone who currently use the production control loggin 'user1'.
Hi All,
We have a scenario in production where we want only one user from a group to modify the file. The file is not set to write permission for application manager.
-r--r--r-- 1 amgr u00 15661716 Aug 30 00:06 DCI.dat
So here amgr will have permission to edit the file. We want a... (10 Replies)
Guys, i wanna get any user files with write permission (on user or group permission) for review but i confuse with -perm parameter.
any body can help me to explain what is that mean?
thank's (1 Reply)
Folks,
I have written one script for following condition by referring some of online post in this forum. Please correct it if I'm missing something in it. (OS: AIX 5.3)
List the idle user. (I used whoidle command to list first 15 user and get username, idle time, pid and login time).... (4 Replies)
Hi All,
Need urgent help!!!
Can anyone tellme how can we send a message on specific user terminal and get a response from user in return.
Thanks in advance. (3 Replies)
On our home network, with 2 Macbook pros running OS X 10.6.*, I would like be able to popup a message to the user of the other computer.
Is there a way I can "call" from one computer to another not using skype, or ichat or any application that the user has to have running?
I guess first I... (8 Replies)
Hi Gurus,
is there a possibility to show where a user can write to?
i want to see all directories where a user has permissions to write to.
Kind Regards
FranzB (0 Replies)
I need to find all the files that have group Read or Write permission or files that have user write permission.
This is what I have so far:
find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}'
It shows me all files where group read = true, group write = true... (5 Replies)
Is there anyway that I can reset user's password using a script/ssh command?
ie. emulate passwd command with a default password of abc123 or even null value?
> ssh server1 pwdadm user1 < /dev/null
or
> ssh server1 passwd user1 < /dev/null
neither worked for me.. but you know what I... (1 Reply)
Is it possible to grant write privileges to a user on a directory with out having to add the user to a group or make the user the owner of the directory?
My background is in Windows and in Windows you can grant specific privileges to a user without having to put the user in a group or making the... (3 Replies)