I need this to work with Mac connecting to Ubuntu as well. Become a root user via the su command or sudo command: your-mbp-macmini:~ vivek$ sudo -i Finally change your root user password: passwd. There are two commands to do so: sudo and su. Active 3 years, 9 months ago. Acting as Root with Sudo. I'm using windows to connect to Ubuntu. With sudo -s with sudo su . Normally, you don't run sudo su, but you just run sudo command.Once you type your password, sudo will record a timestamp and let you run more commands under sudo without having to type your password for a few minutes. Joined Jul 15, 2009 Messages 211 Reaction score 0 Points 16 Location In front of MY MAC OR LINUX BOX Your Mac's Specs Mac Pro Workstation Airport Extreme ATV 2 Ipad Nov 28, 2009 #1 If this is not the correct forum to ask this question I apologize . Users can gain root by “sudo” and not by switching to the root user. Normally the command prompt displays $ and sudo commands may not run; it won't even accept the Admin or root passwords. Just open the Terminal application and preface a Unix command with sudo, like this: Both sudo -s and sudo su makes user root. Don't use sudo su but only "sudo". But, if you're comfortable with the command line interface (CLI) and have system level tasks to do, there's no reason not to use su.I've used several distros where no one even mentioned using sudo. sudo. Share. I understand how to do SSH Tunneling to admin the system services. Thread starter dobby; Start date Nov 28, 2009; D. dobby. Currently, I use root user login directly, but password login is disabled. Much like sudo su, the -i flag allows a user to get a root environment without having to know the root account password.sudo -i is also very similar to using sudo su in that it’ll read all of the environmental files (.profile, etc.) If you run sudo su, that will open a shell as the superuser.Type exit or Ctrl-D to exit this shell.. linux sudo. Mr-Rabbits-Mac:~ notadminuser$ su ladmin. What Is Su? sudo, which is a n acronym for super user do, is a command that runs an elevated permission without a need to change your identity. You don't want to go into super user mode like in Linux, MacOS is slightly different, you want to act like one as administrator. The passwd command changes the user’s password. It's amazing what an rm -rf * can do if you're root. You might need to use "sudo" in from of every commando though. Is there a way to keep sudo & key authentication. Difference between sudo -s and sudo su in mac os. As in other Unix-based operating systems, this command allows administrators to temporarily act as the root user on a Mac. Let’s find out about them. The same is true for commands that offer shell escapes (including most editors). From here I can run any sudo commands desired, entering ladmin's password as needed... bash-3.2$ sudo chown user2 /some/folder More on passwd command. Sudo su. If a user runs a command such as sudo su or sudo sh, subsequent commands run from that shell are not subject to sudo's security policy. is there any some difference? Viewed 438 times -3. Difference between “sudo” and “su” command in Linux, UNIX, or Mac OS. The sudo command runs any command as another user account and is commonly used to elevate permissions so that the command is run with elevated security privileges (which in Linux terms is known as the root user).Sudo … Before you enable the root user account on your Mac, you should know about an alternative called sudo. Ask Question Asked 3 years, 9 months ago. Using sudo -i is virtually the same as the sudo su command. As far as the to su or not to su debate, I think it's silly.su is against the religion of Ubuntu and it's not something to do carelessly. This will prompt for the ladmin account's password, once entered you will see a bash command prompt. To run these commands, first su to … The sudo commands can also be run when logged in to an Admin account, after entering su or su root in Terminal. I didn't understand how to use sudo and SFTP at same time. Please note that sudo will normally only log the command it explicitly runs. “Su” stands for substitute user.