Borked Ubuntu With Putty SSH Cmd Line

I am not sure what happened here, and I find it oddly disturbing that a Putty session from Window could do this, but here is what I did -

I was attempting to open a ssh redirect session from Putty command line on my W7 work PC to my home PC running Ubuntu 14.04. I've done this before with the Putty GUI and had no issues at all, but this time I was using cmd line and it never did connect. I ran this command:
Code:
putty -ssh -D 1080 -P 22 domain.com

The Putty window opened but never connected. I tried twice and when it didn't connect, I gave up and went back to the GUI. I connected with the GUI just fine, but after connecting an SSH session to my Ubuntu server at home, I noticed it was acting odd.

Long story short: It was in a "read-only" mode, saying the file system was read-only. I couldn't run apt-get update or even create a new folder in my Home folder or desktop. I remotely rebooted the machine and it never came back online.

When I got home I checked it, and it told me that Ubuntu had found some errors, and was asking if I wanted to correct them. I said yes and it took a short while, but then finally let me log back in.

After this, the box is about 90-95% back to normal except for a couple of odd things that I don't understand.

The main issue is that my Samba shared drives are no longer working. The fstab file looks the same and can connect to other machines, but nothing can connect back to the Ubuntu box. The folder permissions are correct also. I have a CentOS7 box, a Fedora laptop and a W7 box - none of them can connect to my Ubuntu box. I only run Samba and connect with it, even from Linux boxes, just to make it simple (since Windows is stupid and can't use NFS) - this has always worked in the past. Now for the life of me, I can't figure out why nothing will connect.

Is there a logfile or trouble-shooter I could look at it see what happened? It should be in /var/log somewhere, but I don't know where to start. SSH? Samba? The entire filesystem was read-only for a short while, so is there a FS or System log in /var/log?

I am kinda confused on this one, any help is appreciated.


Similar Content



Sharing Folders And Mounting Shares With SetGID / Samba

OK this is kinda long, so I will shorten it as much as I can, as to not be long-winded.

My current network at home:
1 - CentOS 7 desktop (server)
1 - Ubuntu 14.04 desktop
1 - Fedora 21 laptop
2 - Windows 7 desktops
some other various windows boxes also that don't get used regularly, but are on the network.

My 2 Linux desktops (which I use as servers, but they really aren't) have shared folders on them, which I share to the network via Samba (CIFS). I use Samba because Linux is smarter than Windows and Windows won't read NFS, so I share them as Samba so all devices can see them.

Generally speaking, if I share the folders on each box as 0777, I have no issues. But lately I have been wanting to implement some better security, so I wanted to SETGID and chown the shared folders from the local machine to a specific group, then change the folders to 2774.

My problem is that I keep getting permissions errors when trying to connect from the other Linux machines, and sometimes the Windows machines also. My main question is: do I CHMOD 2774 the local mount-point before mounting it? Or so I CHMOD 2774 the shared folder on the other server, then mount it locally to a folder whose permissions are different? Or do I CHMOD both of them the same?

basically the uis and gid ownerships change on a local folder when I mount a shared drive to that folder, so when I try to write or sometimes read that local folder, I get permissions errors.

I can provide any additional info needed.

Help With KDE

Hello, I am new to Linux and I am having difficulty setting up KDE. I have a vps with Debian 7 Wheezy on it and I need to get KDE working on it. The Linux installation from the vps company was very basic...I had to update the packages and install kde and kdm using the apt-get install kde and apt-get install kdm commands. When I type xstart to start the x server I get a message with the version number and other information so I am assuming that it is installed, but at the bottom of the message I have no cursor (I am able to type but when I hit the enter key after entering a command nothing happens) and the # is no longer there so I am unable to continue working. The only way i can get the command prompt and # back is to close Putty and reopen it (then I have to log into the vps all over again). From what I have read online, when I type startx, it should load KDE.

I was able to set the display by using the export DISPLAY=:0.0 command. But when I type startkde I get the message 'No protocol specified" and the next line says DISPLAY not set or unable to connect to xserver.

I have been using Putty to log into the vps, but yesterday I decided to use the web based login utility offered by the vps company. When connecting to the vps in this manner I am presented with a traditional looking login screen (I am assuming it is KDM). The user name that was provided to me from the vps company is 'root' ...well, when I try to login using KDM (the plasma setting) I get an error stating that 'root' logins are not allowed. Considering that the KDM is visible when logging in using the web based utility, I have a feeling that the KDE is also working...but I can't log into it because the user name is 'root' . However, when I use Putty I cant seem to get anything to load and start the way it is supposed to. I would appreciate any help in getting the KDE to work in Putty and the login via the web based utility to accept my username that the vps company gave me. Thank you.

Can't Access Samba Share

I have set up a SFTP which I can connect to, go to the right directory and read/write files to.

The full path is home/sftpuser/SFTP/Customer
The user "sftpuser" I am connecting with is in the group "ftpusers" which has read/write access.

That works fine.

Here is my sshd_config:
Code:
Match Group ftpusers ChrootDirectory /home/%u/
 ForceCommand internal-sftp
  AllowAgentForwarding no
  AllowTcpForwarding no
  X11Forwarding no

However, I made a samba share of the folder Customer, when I go to the IP adress on a Windows machine "\\10.0.0.1\" I can see the folder Customer, when entering it requests user/pass and afterwards gives an error: you have not the right permissions.

In Webmin:
Customer /home/sftpuser/SFTP/Customer Read/write to everyone

My smb.conf:
Code:
[global]
    syslog = 0
    log file = /var/log/samba/log.%m
    read raw = no
    write raw = no
    passdb backend = tdbsam
    workgroup = DOMAIN
    usershare allow guests = yes
    socket options = TCP_NODELAY
    pam password change = yes
    passwd program = /usr/bin/passwd %u
    unix password sync = yes
    obey pam restrictions = yes
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    server role = standalone server
    server string = %h server (Samba, Ubuntu)
    max log size = 1000
    map to guest = bad user
    panic action = /usr/share/samba/panic-action %d
    dns proxy = no



[Customer]
    force create mode = 755
    browsable = yes
    public = yes
    path = /home/sftpuser/SFTP/Customer
    force directory mode = 755
    writeable = yes
    valid users = @ftpusers
    force group = ftpusers
    write list = @ftpusers

I have been struggling for 3 days and am totally out of ideas.

LS -L for the folder:
Code:
total 4
drwxrwx---+ 2 sftpuser ftpusers 4096 Apr  9 11:35 Customer

How Can I Run An Executable File On A Remote Linux Server Using Putty?

Hi, I'm trying to run an executable file on a remote server using Putty? I downloaded PuTTY and connected through the Putty Configuration window with the SSH connection type selected. Once I connected, the cmd window disappeared so I assume I'm connected. Now I want to run an executable file on the remote server.

How can I run an executable file on my remote Linux server using Putty?

Thanks for any help with this.

SSH Login To Server Always Fail Upon First Attempt

Noticed recently that my first SSH attempt (using putty) to a Red Hat server always fail. Must leave the failed session on, then the second SSH attempt will succeed. If I close the failed ssh session, the second attempt will also fail as well.

This issue only cropped up about two weeks ago and it also happens to other users for this RHEL server only. I am using putty(release 0.64) but other users are connecting to it via command line SSH in their Linux desktop. Not aware of any changes done to this RHEL server recently.

Any suggestions on where should I start looking into?

Samba Shares Not Available To Windows Machines On The Network

Linux 14.04 server set up following instructions on http://www.havetheknowhow.com

I have been trying to connect to the samba shares from two windows machines. The server is visible but when I try to connect it requests a logon and no matter what I enter it fails. I have been using webmin to set this up and the samba version is 4.1.6-ubuntu.
One note, webmin did not show any samba user groups.

all systems show "WORKGROUP" as the workgroup

CentOS 6 - Connection Reset By Peer Error

Hi,

I have a CentOS 6 machine [Machine X], which I connect to using a putty client or from another CentOS 6 machine.

Now, the machine X intermittently sends a connection reset message to all SSH sessions -

Code:
Read from remote host 1.1.1.1: Connection reset by peer
Connection to 1.1.1.1 closed.

I have switched off the firewall on the machine & there are no session timeout values set.

How do I find out what is causing this issue?


Thanks

Bhushan

Is A DHCP Router A Network Server?



I have several computers connected to a D-Link DIR605L router, two with ethernet cables and two through wifi. The Windows XP computer can see itself and nobody else. The Ubuntu (trusty) desktop and Ubuntu (lucid) netbook computers see nobody (unable to retrieve file list from server) and the Windows Vista computer only sees itself. Clearly, I have failed to configure something or a set of somethings.
Do I have to have one of the computers always on, acting as some kind of file server or can the router do this job? This is a new router. My old one (whose power supply went phut) connected everybody without arguing about it and we could share files around, even with a mix of OSs.
Since this is a local network only, I have no firewalls enabled, as far as I know ...
All of the network set-up posts I've found rabbit on about how to get your internet connection working through your router, which is not an option for me. I have dial-up working on the XP computer and a mobile wireless USB dongle for internet access on the trusty desktop.
I've installed samba and a few other packages, but so far, none of them have solved my problem. Can someone please tell me where to start and which tutorials to read? If I have to set up a computer as a file server, I guess it will have to be the XP thing, as it's the only one that is always running, but I'd like to avoid that, if possible, as I speak XP worse than I speak Ubuntu.
BTW, D-Link are no help at all, two hours on the 'phone and they were still trying to get me to connect to an ADSL service I don't have ...

Problem Setting Up Samba -- Korora 21 (Fedora)

I've got my new system up and running. It's a nice fresh change after running Linux Mint for the past 4 years. Now comes the time of setting things up the way I like them.

As part of my setup, I have a all of my DVD's backed up onto my computer so that I can use a media server in the house. I run XBMC at my TV's with a central samba server (my computer) holding the movies.

In LM, all I had to do was right-click the directory "sharing" and select SMB share and type in the name. Everything else was done for me. This doesn't seem that simple.

Here's what I've done:
1. Menu > Administration > Samba
2. Entered in all the directories to share, under the BASIC tab I've selected visibile, writeable. Under the ACCESS tab I've selected a user (see below).
3. I've created a system user called xbmc with the password of xbmc.
4. I've created a samba user called xbmc with the password of xbmc.

Still not working. So, I went into the shell where I manually started the smb service:
# systemctl start smb.service

So, I went back to Menu > Administration > Samba > Preferences:
Set workgroup to WORKGROUP (but it automatically changes it to lower case after I exit).

Drop to terminal and restart service with systemctl.

I go over to my XMBC installation and try to connect to the source and it finds the SMB share. I click on it and after about 30 seconds a window pops up asking for login credentials. I enter xbmc/xbmc and after about 30 seconds it just cycles through. XMBC doesn't offer any messages, so I went downstairs to my Windows machine and tried to connect to a network drive. I enter in \\IP\share-name and after a few seconds it asks for login credentials. I enter xbmc/xbmc but then it fails with "bad username or password".

I'm not sure what I need to do to get this working.

Here is my /etc/samba/smb.conf file:
http://pastebin.com/m9ExpPJF

System Korora 21 (just installed/updated)
kernel: 3.18.9-200.fc21.x86_64

Selecting Multiple Line In Putty Ssh

I have a problem with the putty ssh connection. The operating system is Windows 8.
How do I select a few lines and remove them. Using the mouse and shift + arrow keys on the keyboard does not work properly.