Solved

su - pielm

Posted on 2011-02-18
2
281 Views
Last Modified: 2012-05-11
hi,
what will this commadn do ?
0
Comment
Question by:aashee
2 Comments
 
LVL 11

Accepted Solution

by:
rowansmith earned 250 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 250 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

786 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