UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old February 18th, 2005, 07:13 PM
runia runia is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 5 runia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 58 m 38 sec
Reputation Power: 0
checking "su" environment

Hi, I need to check out what the environment would be expected to look like if I actually logged in as a root.After THOROUGH STUDY of 'man' I think the command should be:
"su - ".But according to 'man' this is the case if the login shell is Bourne shell (man reads :.. /usr/bin/sh..) or an empty string in the specific user's password file entry.My login shell is csh so when I run this cmd it asks me for password.
Do I have the command right? What is the same cmd for csh?
Thanks in advance.
P.S.
In response to guggach'es accusations: I wish I were.

Reply With Quote
  #2  
Old February 19th, 2005, 02:28 AM
guggach guggach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Middle Europa
Posts: 1,083 guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 19 h 33 m 4 sec
Reputation Power: 9
su always will ask you for a passwd as long you are not the boss.
su [username] just change the usr-id
su - [username] does the same but the new shell inherit the environ settings
of that user, sourcing the appropriate .profile, .login and .??rc, according
to what's defined in /etc/passwd
Quote:
In response to guggach'es accusations: I wish I were.

?????
to make alias in ksh, put in ~/.kshrc
alias pollo=palla
in csh, put in ~/.cshrc
alias pollo palla
if you need args
alias pollo 'palla \!*'
this will change: pollo aa bb cc
in palla aa bb cc
PS: csh (on cmd line) is my preferred tool, as script langauge a c??p
__________________
working on Solaris[5-9], preferred languages french and C.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > checking "su" environment


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway