5

Newbie networking question here...

So, I have followed some instructions from my university to connect to my personal space on the university network. The instructions are to open Nautilus, then under Network on the left-side panel, choose Connect to Server, where I then enter smb://foo.bar.com/user into Server Address, where foo.bar.com is the address of the network, and user is my username.

This works fine, and I can then browse my personal space. However, I want to do some more complicated things than simply browsing, such as changing the permissions of various files. And I would like to be able to do this from the command line as I have been used to in the past.

So, what I tried to do is to ssh into this network. I'm not really sure whether ssh is the right thing to be doing here, and what it really does anyway, but I had heard that this is the way to connect to servers through the command line. So, in the command line, I tried entering ssh foo.bar.com, which then asked me for my password. But after entering my password, I got a message saying:

Connection closed by xxx.xxx.xxx.xxx,

where xxx.xxx.xxx.xxx is an IP address which I have determined is the exact IP address of the server I am trying to connect to. This message appears even after I have closed my other connection to this server from Nautilus.

So, this may be an internal issue with my university which I need to resolve, but before I do that, is this the correct way I should be trying to access the server from the command line? Or is there another way which is more typical and might work for me?

Thanks!

2
  • 4
    If your username on the university system is different than your username on your local machine, then you would need to ssh [email protected]. However, its also possible that your university does not allow students ssh access to this machine. Best is to contact support at your university. Jul 27, 2016 at 14:10
  • SMB/CIFS allows changing access permissions for both Windows ACLs and Unix permissions (with the appropriate server and client extension which Samba provides on both end assuming that the server is a *nix system and not Windows). Aug 5, 2016 at 17:57

2 Answers 2

5

While ssh is not the same as Samba, and therefore it was likely that you failed, you can do a cifs-mount for a Samba-shared directory:

  • create a folder in your (Johnny's) home dir e.g. mkdir univerity_space
  • then connect via

    sudo /bin/mount -t cifs -o user=UNIVERSITY_USERNAME,uid=1000,gid=1000 //foo.bar.com/user /home/johnny_johnson/university_space

    check that your local (Ubuntu) user ID and group ID is 1000 via echo $UID (that is under which username and group the folder permissions are to be set on your Ubunut machine, i.e. it should be Johnny's in the end). It might be another number, just take that then.

  • you will be prompted for the password

  • disconnect via sudo /bin/umount /home/johnny_johnson/university_space

Note that the permissions you are setting now are permissions in terms of your local Ubuntu machine. See for @madneon's answer on the differences of ssh and Samba.

2
  • If the server provides you with Samba shares, that doesn't mean that it is allowing console SSH connections, or provides any other service and/or functionality.

  • Samba server has its own user database (it might be synchronized with system).

  • Samba network protocol doesn't carry the Linux file permissions.


You should ask your server administrators about accessing the console.

1
  • @DavidFoerster How is this not an answer?
    – Seth
    Aug 8, 2016 at 18:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .