Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

su - pielm

Posted on 2011-02-18
2
Medium Priority
?
291 Views
Last Modified: 2012-05-11
hi,
what will this commadn do ?
0
Comment
Question by:aashee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 11

Accepted Solution

by:
rowansmith earned 1000 total points
ID: 34931208
This command will switch to the user named "pielm" the "-" will prevent the running of the users startup scripts (if any).  If you are not root when you run this command then you will be prompted for the password of user pielm.

Try typing "man su" for the su manual page.

Or fllow this link:

http://unixhelp.ed.ac.uk/CGI/man-cgi?su

0
 
LVL 12

Assisted Solution

by:upanwar
upanwar earned 1000 total points
ID: 34931424
If you do the su - <user name> then it will bring you in the perticular user's home directory and will load user's environment variable and you.

su - pielm

In short you will become the user pielm with full rights and environment setting of pielm but If you will not include the - then you will just become user pielm, without changing the current directory and environment variable.

like: su pielm

If you executing this command as root then It will not ask for password but if you are executing this as a not root user then it will prompt for password.

If we simply type su or su - with a non root user, it means we are trying to become root and it will prompt us for password.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question