Login as "user", then "su -" to root?

Come here to discuss FileZilla and FTP in general

Moderator: Project members

Post Reply
Message
Author
jhobbs
500 Command not understood
Posts: 1
Joined: 2005-02-27 19:22

Login as "user", then "su -" to root?

#1 Post by jhobbs » 2005-02-27 19:27

On a dedicated server where I have root access, does FileZilla allow logging to a user account via SFTP using SSH2, then transfering to the root account via "su -" (after providing the password)?
Jack.

User avatar
botg
Site Admin
Posts: 35491
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

#2 Post by botg » 2005-02-27 21:58

You have to reconnect to the server using a different username (in this case root).

s1dest3pnate
500 Command not understood
Posts: 2
Joined: 2010-01-05 05:51

Re: Login as "user", then "su -" to root?

#3 Post by s1dest3pnate » 2010-01-05 05:58

I think it is appropriate that I bring attention back to this thread.

First off, since it has been a few years since this thread was created, is it now possible to "su" to a different user or is there some sort of FileZilla equivalent to that?

Most Unix admins will not permit logging into "root" directly for security reasons so therefore, we cannot login as root through FileZilla. However, some of us may prefer to be able to login as root through FileZilla and having some sort of "su" functionality would allow this.

Please advise if this feature is now available and if not, why it may or may not be considered as a feature for a future release of FileZilla.

Thanks in advance.

User avatar
botg
Site Admin
Posts: 35491
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Login as "user", then "su -" to root?

#4 Post by botg » 2010-01-05 06:49

Unlikely that this will ever get implemented, su isn't part of SFTP.

s1dest3pnate
500 Command not understood
Posts: 2
Joined: 2010-01-05 05:51

Re: Login as "user", then "su -" to root?

#5 Post by s1dest3pnate » 2010-01-05 06:52

botg wrote:Unlikely that this will ever get implemented, su isn't part of SFTP.
Why must it be unlikely? SFTP uses SSH just like Putty (from my understanding) so why can't su be a part of SFTP?

User avatar
boco
Contributor
Posts: 26899
Joined: 2006-05-01 03:28
Location: Germany

Re: Login as "user", then "su -" to root?

#6 Post by boco » 2010-01-05 09:43

SFTP is only a subset of SSH2, meant for filetransfers. What you want is a full SSH2 session (remote shell) where all commands are avilable. The kind of session PuTTY provides.
### BEGIN SIGNATURE BLOCK ###
No support requests per PM! You will NOT get any reply!!!
FTP connection problems? Please do yourself a favor and read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
### END SIGNATURE BLOCK ###

User avatar
botg
Site Admin
Posts: 35491
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Login as "user", then "su -" to root?

#7 Post by botg » 2012-02-10 07:04

Actually that's not correct. The SFTP and SCP protocols do not say anything about it. Switching to root happens outside of SFTP and SCP. First you switch to root using some totally undefined, arbitrary mechanism, then you initialize SFTP (or SCP).

JohnnyBones
500 Command not understood
Posts: 1
Joined: 2012-04-09 19:17
First name: John
Last name: Siebert

Re: Login as "user", then "su -" to root?

#8 Post by JohnnyBones » 2012-04-09 19:21

I agree. Why not let them run a simple command like su so they could move to the user they want to use if their root admin is disabled? This way they can download, edit, transfer and modify files under the root user.

User avatar
botg
Site Admin
Posts: 35491
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Login as "user", then "su -" to root?

#9 Post by botg » 2012-04-09 21:15

Wish it were that easy, unfortunately su isn't a standardized command.

cowen80194
500 Command not understood
Posts: 1
Joined: 2021-07-19 01:03
First name: chris
Last name: owen

Re: Login as "user", then "su -" to root?

#10 Post by cowen80194 » 2021-07-19 01:13

I need access to Xeams an email system, the config folder permissions show to be root root. I log on as xeams which is the root user, as Ubuntu won't allow a root user log-on that I can find, name to be created. So via putty, I can get in via su to that folder but without su it the session is denied access to the same folder using putty.
I need to FTP or SFTP in and do a restore and configuration of files to fix a crashed Xeams, but following the directions of the site, there is more to it than cp or mv of the config folder to that location.
Having a method to log in as su after authentication would be helpful when working with permissions on files and directories that have the ownership of ROOT ROOT.

Post Reply