LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-04-2005, 09:49 PM   #1
chibi
Member
 
Registered: Aug 2004
Location: Canada
Distribution: Debian
Posts: 62

Rep: Reputation: 15
changing current user without logging out


Hello,

Hopefully a really simple question.

I have logged in as root and setup some files for a user. Lets pretend the user is named someguy. I change the ownership of the files so they are owned by someguy.

I want to execute one of the files, but that means the process will be owned by root and not by someguy right? So thats a problem..

What I would like to do, is just type a command like: changeuser someguy password and have it switch to that user. then when I am done type exit and then it goes back to root. it would be cool that because I am root i wouldnt need to know the password for that user. is there something like this thats possible?

or perhaps a way to execute the file as another user instead of root?

Thank you for your help, greatly appreciated

-Chibi
 
Old 06-04-2005, 09:59 PM   #2
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 61
Certainly no problem to change to another user from root and execute a process ...
# su anotheruser anotheruserspassword
$ processname

A more interesting question (to me) would be can I start 2 Xwindows sessions owned by two different users?

How about about one user in workspace1 running an Xwindows app, and another user with his own Xwindows setup in workspace2?
 
Old 06-04-2005, 10:03 PM   #3
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Quote:
A more interesting question (to me) would be can I start 2 Xwindows sessions owned by two different users?
You can do this by doing 'startx' or 'xinit' as one user, then switching to another console, logging in as another user, and doing 'startx -- :1' or 'xinit -- :1'.

You can then switch between the X sessions using Ctrl-Alt-F7 and Ctrl-Alt-F8

Dave
 
Old 06-06-2005, 02:40 AM   #4
chibi
Member
 
Registered: Aug 2004
Location: Canada
Distribution: Debian
Posts: 62

Original Poster
Rep: Reputation: 15
Thank you for answering
 
  


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
Prevent a user from logging into X? sorrodos Linux - Security 6 06-26-2004 04:30 PM
Prompt w/ current dir and user Jair Slackware 2 03-15-2004 07:16 PM
Changing default current directory to / when ftp ckit Linux - Newbie 1 01-27-2004 08:34 PM
Save Current Setup Error Logging out Mehul_Sangani Linux - Software 1 09-14-2003 01:54 PM
Changing current user password - Newbie brian212 Linux - General 1 08-20-2002 03:49 PM


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