LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 11-30-2016, 04:01 PM   #1
gentlesome
LQ Newbie
 
Registered: Nov 2016
Posts: 11

Rep: Reputation: Disabled
User issues


Hi People of Unix,


I am runing a list of processes (process1, process2, process3,...) by User1, and i am trying to stop and start these processes by User2 after my task is completed.

The issue is User2 can not start all processes. some of them are started and others are still stopped.

Please if you have any idea about the issue, please feel free to comment.


Thanks
Khalid
 
Old 12-01-2016, 08:13 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,660

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by gentlesome View Post
Hi People of Unix,

I am runing a list of processes (process1, process2, process3,...) by User1, and i am trying to stop and start these processes by User2 after my task is completed. The issue is User2 can not start all processes. some of them are started and others are still stopped. Please if you have any idea about the issue, please feel free to comment.
Hard to say, since your question is fairly vague. You don't tell us version/distro of Linux, or really even explain what you're trying to do...hard to understand your question. Can you show us the script/program you've written so far, and tell us where you're stuck, and what your goals are???
 
Old 12-01-2016, 10:59 AM   #3
gentlesome
LQ Newbie
 
Registered: Nov 2016
Posts: 11

Original Poster
Rep: Reputation: Disabled
Thanks For your replay and sorry for the confusion, i am currently not quite writing any script..... its just as simple as : one user is starting a process other is stoping it and restarting it :

I will give an example using Gedit . ...

Linux distri : Red Hat Enterprise Linux Server release 5.11

Scenario :

let's say i am trying to start gedit 5 times throuht user1, and i need to stop those 5 gedit programs by User2, finish a task (clean up some temp files for exemple) and then restart those 5 gedit instances by User2.... so everythng looks like the same before USer2 started his work...

the issue is : when User2 start those 5 gedit instances, only couple of them are started.....

Thanks in advance....
 
Old 12-01-2016, 12:45 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,660

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by gentlesome View Post
Thanks For your replay and sorry for the confusion, i am currently not quite writing any script..... its just as simple as : one user is starting a process other is stoping it and restarting it :

I will give an example using Gedit . ...

Linux distri : Red Hat Enterprise Linux Server release 5.11

Scenario : let's say i am trying to start gedit 5 times throuht user1, and i need to stop those 5 gedit programs by User2, finish a task (clean up some temp files for exemple) and then restart those 5 gedit instances by User2.... so everythng looks like the same before USer2 started his work...the issue is : when User2 start those 5 gedit instances, only couple of them are started.....
..and this sounds suspiciously like a homework question, or you're trying to do something shady. What's your goal in trying to do this?
 
Old 12-01-2016, 03:42 PM   #5
gentlesome
LQ Newbie
 
Registered: Nov 2016
Posts: 11

Original Poster
Rep: Reputation: Disabled
thanks for your replay :

I like your replay
unfortunately, this is not waht you think homework .... i literally want to do what i explained earlier there is no fishy thing ...

i have 2 users : one is for application usage and other one is for maintenance usage.
1 - Processes srtart by application user.
2 -Manitenance user need to stop current processes.
3 -do maintenance.
4 - re-start the processes.

the issue is when maintenance process try to start those processes some of them are started and some stay stopped..


This is very simple case .....Thanks again

Last edited by gentlesome; 12-01-2016 at 04:39 PM.
 
Old 12-01-2016, 05:48 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,660

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by gentlesome View Post
thanks for your replay :
I like your replay unfortunately, this is not waht you think homework .... i literally want to do what i explained earlier there is no fishy thing ...

i have 2 users : one is for application usage and other one is for maintenance usage.
1 - Processes srtart by application user.
2 -Manitenance user need to stop current processes.
3 -do maintenance.
4 - re-start the processes.

the issue is when maintenance process try to start those processes some of them are started and some stay stopped..
So then why the request to have "everything look the same", so that user2 doesn't know what happened?
Quote:
This is very simple case
So if it's so simple, why haven't you done it?

Have you looked into the "kill" command? Specifically, the -STOP (or -TSTP) and -CONT parameters?? You can stop/pause an application, do whatever you'd like, then CONTINUE from where you left off.
 
Old 12-02-2016, 02:51 PM   #7
gentlesome
LQ Newbie
 
Registered: Nov 2016
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
So then why the request to have "everything look the same", so that user2 doesn't know what happened?

So if it's so simple, why haven't you done it?

Have you looked into the "kill" command? Specifically, the -STOP (or -TSTP) and -CONT parameters?? You can stop/pause an application, do whatever you'd like, then CONTINUE from where you left off.
Hi This replay sounds little rude to me
So if it's so simple, why haven't you done it?

..... I am saying the case is simple to understand .... and from your answer is see that you still did not get my point when you are talking about "kill" my issue is not stopping the proceses ... my issues is about restarting a process back under different user... and i gave an exemple with Gedit ...
If you are not willing to answer .. please let someone else maybe can be more open to help other than being arrogant ..

And one more time thank you for the help you provided .


Thanks

Last edited by gentlesome; 12-02-2016 at 02:53 PM.
 
Old 12-02-2016, 03:30 PM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,660

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by gentlesome View Post
Hi This replay sounds little rude to me So if it's so simple, why haven't you done it?

..... I am saying the case is simple to understand .... and from your answer is see that you still did not get my point when you are talking about "kill" my issue is not stopping the proceses ... my issues is about restarting a process back under different user... and i gave an exemple with Gedit ...
If you are not willing to answer .. please let someone else maybe can be more open to help other than being arrogant ..
Anyone can post anything they'd like to you...I certainly can't stop them. And I get your point very well.

What I DO NOT see is evidence of your own work. You claim this isn't homework, and say this isn't for anything shady, and claim to already have it partially working. Great...so post what you've already done. Based on your REPLY (the word is not 'replay'), it seems like you're looking for something VERY specific, since both the -STOP and -TSTP flags work fine for such things.

Again, read the "Question Guideline" link in my posting signature. You have not shown your own work, actually given details about what you're trying to accomplish (and just re-stating your question doesn't provide more details), told us what version/distro of Linux, etc.
 
Old 12-02-2016, 04:31 PM   #9
gentlesome
LQ Newbie
 
Registered: Nov 2016
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
Anyone can post anything they'd like to you...I certainly can't stop them. And I get your point very well.

What I DO NOT see is evidence of your own work. You claim this isn't homework, and say this isn't for anything shady, and claim to already have it partially working. Great...so post what you've already done. Based on your REPLY (the word is not 'replay'), it seems like you're looking for something VERY specific, since both the -STOP and -TSTP flags work fine for such things.

Again, read the "Question Guideline" link in my posting signature. You have not shown your own work, actually given details about what you're trying to accomplish (and just re-stating your question doesn't provide more details), told us what version/distro of Linux, etc.
First of all if tooke a second , you sould have found that i already gave Linux distribution , and also being to rude to someone who (let's say made a mistake) won't help anyone .... giving guidance does not mean being rude to anyone...
and one more thing, sorry, i did not know that i have to prodive what i did as qa proof or just to say " i did not ask you to do it for me" ...... about focusing on my orthography rather than the purpose of the post itself is very clear as Eleanor Roosevelt said :

Great minds discuss ideas; average minds discuss events; small minds discuss people.


And one more thing if you don't like a post just don't replay your rudeness .... and yes i mean replay not replcya because you are posting your rudeness over and over again.....


And thanks again for your time
and if you don't like it don't simply put anything just ignore , you have no right to school anyone


Thanks and Regards
 
Old 12-03-2016, 10:04 AM   #10
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,660

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by gentlesome View Post
First of all if tooke a second , you sould have found that i already gave Linux distribution ,
RHEL 5.11 is a commercial, PAY FOR distro...are you paying for it? And in your post, you said "by example".
Quote:
and also being to rude to someone who (let's say made a mistake) won't help anyone .... giving guidance does not mean being rude to anyone...
and one more thing, sorry, i did not know that i have to prodive what i did as qa proof or just to say " i did not ask you to do it for me" ...... about focusing on my orthography rather than the purpose of the post itself is very clear as Eleanor Roosevelt said :

Great minds discuss ideas; average minds discuss events; small minds discuss people.
And what did she say about the size of the mind who ignores the forum rules, doesn't read the posting guidelines, and won't answer questions directly when asked??? Since the very first reply, we've been trying to get details out of you about what you're trying to accomplish, yet you won't provide them. If you won't, there is no point in just re-stating your question. You've been given something that works perfectly well, but have chosen to ignore it, for reasons you won't share.

You claim it's not homework, and say it's for 'work', but trying to do something that avoids user detection sounds very suspicious. Since you won't clarify, what do you think we can tell you?
Quote:
And one more thing if you don't like a post just don't replay your rudeness .... and yes i mean replay not replcya because you are posting your rudeness over and over again.....
And how rude is it to plain not answer questions?
Quote:
And thanks again for your time and if you don't like it don't simply put anything just ignore , you have no right to school anyone
Anyone can post what they like....you are wrong in your use of words, and if you want to sound like an idiot after knowing better, that's your choice.
 
Old 12-03-2016, 09:45 PM   #11
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
>[maint intervention on app problem, but (I wonder WHY) change user? "re-start" from beginning or CONTinue?]
I think only root (UID 0) can 'control' (and change EUID of) a process of different UID.
MAYBE: as root, use gdb to attach the pid; call seteuid(<uid2>)
Let us know specifics (e.g. `ps` &above 2?s)... Best wishes.
p.s. I'd suggest, before proceeding further, spend a few minutes on Google of:
process change state|uid
 
Old 12-05-2016, 10:46 AM   #12
gentlesome
LQ Newbie
 
Registered: Nov 2016
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
RHEL 5.11 is a commercial, PAY FOR distro...are you paying for it? And in your post, you said "by example".

And what did she say about the size of the mind who ignores the forum rules, doesn't read the posting guidelines, and won't answer questions directly when asked??? Since the very first reply, we've been trying to get details out of you about what you're trying to accomplish, yet you won't provide them. If you won't, there is no point in just re-stating your question. You've been given something that works perfectly well, but have chosen to ignore it, for reasons you won't share.

You claim it's not homework, and say it's for 'work', but trying to do something that avoids user detection sounds very suspicious. Since you won't clarify, what do you think we can tell you?

And how rude is it to plain not answer questions?

Anyone can post what they like....you are wrong in your use of words, and if you want to sound like an idiot after knowing better, that's your choice.
Now beying described as an idiot ... you only apply rules you like and bypass rules you don't like ...
telling me i am wrong in using a word, i think you don't have the power to open my mind or to judge me ..... as long i think all people can testify i was respectful since the beginning ..... Please if you don't like the post and you judge is as against any rules in this forum ... and as you have the admin power just delete it and stop being rude to people ....

One more time telling be look like an idiot is not acceptable and you have no right to say that to me ...

Thanks
 
Old 12-05-2016, 10:48 AM   #13
gentlesome
LQ Newbie
 
Registered: Nov 2016
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Jjanel View Post
>[maint intervention on app problem, but (I wonder WHY) change user? "re-start" from beginning or CONTinue?]
I think only root (UID 0) can 'control' (and change EUID of) a process of different UID.
MAYBE: as root, use gdb to attach the pid; call seteuid(<uid2>)
Let us know specifics (e.g. `ps` &above 2?s)... Best wishes.
p.s. I'd suggest, before proceeding further, spend a few minutes on Google of:
process change state|uid
Thank you so much for your help and very interesting information

Thanks
 
Old 12-05-2016, 11:03 AM   #14
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,660

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by gentlesome View Post
Now beying described as an idiot ... you only apply rules you like and bypass rules you don't like ...
telling me i am wrong in using a word, i think you don't have the power to open my mind or to judge me ..... as long i think all people can testify i was respectful since the beginning ..... Please if you don't like the post and you judge is as against any rules in this forum ... and as you have the admin power just delete it and stop being rude to people ....

One more time telling be look like an idiot is not acceptable and you have no right to say that to me ...
Sorry, but again, if you intentionally use wrong words/language after you've been told better, you WILL look like an idiot. No clue what you mean by "you don't have the power to open my mind or judge me"...you were told your use of language was wrong, and did it INTENTIONALLY. Doing something wrong when you know better doesn't exactly make someone look smart.

You've been asked multiple times, by two persons (myself and Jjanel), to give us details about what you're actually trying to do, why the solutions given to you won't work, etc., but you will not. You began being rude after first being asked for details, and have escalated more each time. You STILL don't answer questions, and there is no point in posting anything to you, since if you can't (or won't) answer questions/provide details, or even be POLITE, you sure won't get any help from anyone, anywhere.

Last edited by TB0ne; 12-05-2016 at 11:07 AM.
 
Old 12-05-2016, 02:38 PM   #15
gentlesome
LQ Newbie
 
Registered: Nov 2016
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
Sorry, but again, if you intentionally use wrong words/language after you've been told better, you WILL look like an idiot. No clue what you mean by "you don't have the power to open my mind or judge me"...you were told your use of language was wrong, and did it INTENTIONALLY. Doing something wrong when you know better doesn't exactly make someone look smart.

You've been asked multiple times, by two persons (myself and Jjanel), to give us details about what you're actually trying to do, why the solutions given to you won't work, etc., but you will not. You began being rude after first being asked for details, and have escalated more each time. You STILL don't answer questions, and there is no point in posting anything to you, since if you can't (or won't) answer questions/provide details, or even be POLITE, you sure won't get any help from anyone, anywhere.
I am still polite .... who is not polite here ... the person who is giving orders to people trying to school people .. or a person who is still being thankful to people using a wrong language is not at all related to you and you have no right to jugde ....
If you like it you answer you don't like it just leave it ......
and oine more time :
you requested the distribution , i already provided it to you .... my solution did not work for me because noit all processes are re-started ..... And please point me to the reason this make any difference if it's for work for school for fun for self-education ....

I am so sorry that i had to ask aperson like you for help ... sure i don't have the knowledge that you have in this field .. yes it's my fault i gave the opportunity to person like you to be haughty .....

Thanks

Last edited by gentlesome; 12-05-2016 at 02:41 PM.
 
  


Reply



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
User migration issues bitwiseguy Linux - Newbie 9 05-31-2015 02:19 AM
User Profile Issues gvphubli Linux - Newbie 3 05-31-2010 07:12 PM
XGL User Issues guitarboy1016 SUSE / openSUSE 0 04-27-2006 12:11 AM
new user issues lukeprog MEPIS 3 11-03-2005 11:38 AM
New user, got some issues... Turtle25 Linux - Newbie 2 11-16-2004 01:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 07:48 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