![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Enable sudo for Win AD users authenticated with Linux samba winbind service | will_mike | Linux | 0 | 06-03-2008 11:38 AM |
| Add environment variables for all users | ashish_uiit | SUN Solaris | 2 | 02-27-2008 08:59 AM |
| [ Environment Variable ] Probleme with export JAVA_HOME | marcel_kobain | UNIX for Advanced & Expert Users | 2 | 12-06-2007 06:12 AM |
| Managing Users in a Global Environment | Randal | UNIX for Advanced & Expert Users | 0 | 02-15-2007 12:14 PM |
| Extracting a users environment variables | Tornado | Shell Programming and Scripting | 2 | 12-04-2006 11:23 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can I export the users environment using sudo?
I want the user to be able to commands as another user.. but when they do that.. I need them to have the environment variables of the other user. is this possible with sudo?
sudo -H -u user env 'env' is giving me the environment of the current user, not the user I want to run commands as. Hope this makes sense (it does in my head |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Try:
Code:
sudo su - <username> -c <command> |
||||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|