安裝中文字典英文字典辭典工具!
安裝中文字典英文字典辭典工具!
|
- What are the differences between su, sudo -s, sudo -i, sudo su?
sudo su Asks your password, becomes root momentarily to run su as root sudo su - Asks your password, becomes root momentarily to run su - as root So in this case you are running su using sudo and you don't have to know root's actual password The results are same as su and su -
- What is the difference between su - and su root?
Add a comment 8 su - switches to the superuser and sets up the environment so that it looks like they logged in directly su root switches to the user named root and doesn't simulate directly logging in If the superuser is named root, then su and su root are equivalent (and don't simulate directly logging in), as are su - and su - root (which do)
- Why do we use su - and not just su? - Unix Linux Stack Exchange
The main difference is : su - username sets up the shell environment as if it were a clean login as the specified user, it access and use specified users environment variables, su username just starts a shell with current environment settings for the specified user If username is not specified with su and su -, the root account is implied as default
- su - user Vs sudo su - user - Unix Linux Stack Exchange
8 sudo su - will elevate any user (sudoer) with root privilege su - anotheruser will switch to user environment of the target user, with target user privileges What does sudo su - username mean?
- Is there a single line command to do `su`? - Ask Ubuntu
Here's why: If you write a password in a command like su <username> -p <password>, it would be stored in plain text in your bash history This is certainly a huge security issue If you need to run commands with su (or sudo) in an automated way, write a shellscript containig the commands without su or sudo and run su <username> script sh
- bash - su options - running command as another user - Unix Linux . . .
I was wondering how to run a command as another user from a script I have the script's owner set as root I also have the following command being run within the script to run the command as the h
- Whats the difference between `su -` and `su --login`? - linux
From su 's man page: For backward compatibility, su defaults to not change the current directory and to only set the environment variables HOME and SHELL (plus USER and LOGNAME if the target user is not root) It is recommended to always use the --login option (instead of its shortcut -) to avoid side effects caused by mixing environments -, -l, --login Start the shell as a login shell
- How do I set the root password so I can use su instead of sudo?
If you still want to use su after reading the warnings in the question, there is no need to set a root password Just do sudo su and you're on your way with your regular password
|
|
|