The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How do i change to super user then revert back to ordinary user ,using shell script? wrapster Shell Programming and Scripting 3 06-04-2008 07:11 AM
Change of user name SunBurntYux Forum Support Area for Unregistered Users & Account Problems 1 06-01-2008 09:12 AM
User name change? Jmt Post Here to Contact Site Administrators and Moderators 1 12-16-2007 04:38 PM
change user through shell script raviraushanjha UNIX for Dummies Questions & Answers 0 12-12-2005 03:11 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-28-2003
scottl scottl is offline
Registered User
  
 

Join Date: Aug 2003
Posts: 8
change user in a shell

Hi,

is it possible to chnage the user in a shell script?

i would like to create a script with should make some actions on the host which needs root permissions.

i want do give the user which should start the script the root permissions.
so is it possible to make a command in the script whch change the user to something else (with root permissions) and after the script the user has the same permissions as before (normal permissions no root ..)

many thx

scott
  #2 (permalink)  
Old 08-28-2003
oombera's Avatar
oombera oombera is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2002
Location: Cleveland, OH
Posts: 804
Here's a couple old posts:

Changing Users
unix scripts

They both suggest the program sudo, so that may be a place to start looking...
  #3 (permalink)  
Old 08-28-2003
ortsvorsteher ortsvorsteher is offline
Registered User
  
 

Join Date: Aug 2001
Location: germany, bavaria
Posts: 48
Maybe you can use this:

su - <username> -c

as root.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:09 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0