Saturday, April 26, 2014

su

  •  su command examples


Switch to a different user account using su command. Super user can switch to any other user without entering their password.
$ su - USERNAME


Execute a single command from a different account name. In the following example, john can execute the ls command as raj username. Once the command is executed, it will come back to john’s account.
[linux@care-server]$ su - raj -c 'ls' 
[linux@care-server]$


Login to a specified user account, and execute the specified shell instead of the default shell.
$ su -s 'SHELLNAME' USERNAME

Related Posts:

  • File and Directory Permissions Permissions is a type of good security features in Linux operating system. Permissions is used to assign on files as well as on directories. There are three types of files permissions: Read (r) - To view a file's … Read More
  • Chage Command with example to manage Linux password expiration v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} chage - change user password expiry information  chage ch… Read More
  • Types of Networks In the world of computers, networking is the practice of linking two or more computing devices together for the purpose of sharing data. Networks are build with a mix of computer software and computer hardware. … Read More
  • Introduction of Shell Scripting What is Shell ?? A shell is simply a program that is used to start another program. Shell accepts your instruction or commands in English (mostly) and if its a valid command, it is pass to kernel. All oper… Read More
  • Introduction - What is Networks ? What is Network ? A collection of computers, servers, mainframes, network devices, peripherals, or other devices connected to one another allowing for data to be shared and used. A great example of a network… Read More

0 comments:

Post a Comment