Grep

TurgonTurgon Banned Posts: 6,308 ■■■■■■■■■□
Just wondered how many of you have bash skills..

I have a couple of Sun Solaris Netras here I want to hack and get up and running. Its been a while..

Comments

  • ccnxjrccnxjr Member Posts: 304 ■■■□□□□□□□
    I'm not a l337 h@x0r but i can navigate a shell and build a box from baremetal ---> ssh-able.
    Configuring more advanced services, i'm a little unsure about.
    loving the new CentOS 6.2 minimal setup!
  • TurgonTurgon Banned Posts: 6,308 ■■■■■■■■■□
    ccnxjr wrote: »
    I'm not a l337 h@x0r but i can navigate a shell and build a box from baremetal ---> ssh-able.
    Configuring more advanced services, i'm a little unsure about.
    loving the new CentOS 6.2 minimal setup!


    Could do with a dummies guide really. I would need to console it from Putty and reset things. No idea of the root password.

    Then I need some basics to set up the network card with IP etc. Its been ages since I messed around with plumbing interfaces in.
  • DevilWAHDevilWAH Member Posts: 2,997 ■■■■■■■■□□
    I can find my what around OK these days although I still get lost by how the file system is organised, one of the "on my lists" to do is compile from source and understand it :)

    But setting up interfaces, DHCP, DNS and that kind of thing is not to bad. all the configs are nice and logical so I find once I can work out were the dam files are then the rest is straight forward.

    Looking forward to getting my Lab back so I can get a few Linux box's back up and running. People will hate me for saying it but the Unbuntu help forum and Wiki has some really good walk though and documentation. From the basic assing an Interface an IP, to creating disk less based systems, and computer clusters. As more of a meddler than an expert I find there stuff easy to follow than some of the more hard core sites around.

    https://help.ubuntu.com/community nice starting point
    • If you can't explain it simply, you don't understand it well enough. Albert Einstein
    • An arrow can only be shot by pulling it backward. So when life is dragging you back with difficulties. It means that its going to launch you into something great. So just focus and keep aiming.
  • TurgonTurgon Banned Posts: 6,308 ■■■■■■■■■□
    DevilWAH wrote: »
    I can find my what around OK these days although I still get lost by how the file system is organised, one of the "on my lists" to do is compile from source and understand it :)

    But setting up interfaces, DHCP, DNS and that kind of thing is not to bad. all the configs are nice and logical so I find once I can work out were the dam files are then the rest is straight forward.

    Looking forward to getting my Lab back so I can get a few Linux box's back up and running. People will hate me for saying it but the Unbuntu help forum and Wiki has some really good walk though and documentation. From the basic assing an Interface an IP, to creating disk less based systems, and computer clusters. As more of a meddler than an expert I find there stuff easy to follow than some of the more hard core sites around.

    https://help.ubuntu.com/community nice starting point

    All I can do is google for consoling a Netra and see what happens from Putty. Rather shy on command line experience these days on Solaris but we will see!
  • GAngelGAngel Member Posts: 708 ■■■■□□□□□□
    I mainly work in redhat and centos but it should be relatively the same. We run a few solaris boxes at work and Ive never really had any issues getting aroudn them. The file locations are off but thats about it.

    Main things are sysconfig, resolv.conf and ifcfg/ifconfig

    I like yum its nice and easy solaris has pkgad? or something like that.
  • exampasserexampasser Member Posts: 718 ■■■□□□□□□□
    Turgon wrote: »
    Could do with a dummies guide really. I would need to console it from Putty and reset things. No idea of the root password.

    Then I need some basics to set up the network card with IP etc. Its been ages since I messed around with plumbing interfaces in.

    You will need to boot into single user mode to reset the root password:

    http://www.cyberciti.biz/tips/solaris-boot-system-into-single-user-mode.html
  • petedudepetedude Member Posts: 1,510
    Turgon wrote: »
    Just wondered how many of you have bash skills..

    I can bash anything!!
    Turgon wrote: »
    I have a couple of Sun Solaris Netras here I want to hack and get up and running. Its been a while..

    Oh, you mean with Unix! That's something else. . . ;D
    Even if you're on the right track, you'll get run over if you just sit there.
    --Will Rogers
  • ChooseLifeChooseLife Member Posts: 941 ■■■■■■■□□□
    I have a few sparcstations and ultra's running at home.
    Fiddling with them was fun... Are you hacking these babies as a hobby?
    “You don’t become great by trying to be great. You become great by wanting to do something, and then doing it so hard that you become great in the process.” (c) xkcd #896

    GetCertified4Less
    - discounted vouchers for certs
  • onesaintonesaint Member Posts: 801
    exampasser wrote: »
    You will need to boot into single user mode to reset the root password:

    Solaris > Boot system into single user mode

    Cyberciti.biz always has great tips.

    I've never dabbled on a Solaris machine, but it's all System V, so Redhat commands should work (for the most part hopefully).

    Once in single user mode you should be logged in as root. simply run "passwd" and set the new password for the root account. If you run into issues, read over this -- solaris - passwd (1)
    Enter shutdown -r now, OR sync, sync, sync, reboot OR if that doesn't work try the three sync commands and then an "init 6" to reboot.
    Now you have root access. Try loggin in as root.
    Then, follow this (literally just googled it) for network setup. Solaris Network configuration

    what's next?
    Work in progress: picking up Postgres, elastisearch, redis, Cloudera, & AWS.
    Next up: eventually the RHCE and to start blogging again.

    Control Protocol; my blog of exam notes and IT randomness
  • exampasserexampasser Member Posts: 718 ■■■□□□□□□□
    If you want to find out the particular version of Solaris installed run "cat /etc/release".

    Developing your bash skills isn't hard, just takes some practice.

    Here a list of common commands (it says for Linux but most of them should also apply t Solaris):
    http://ss64.com/bash/
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    I has skillz.

    My hate for Solaris burns with the heat of a thousand suns, though.
  • ccnxjrccnxjr Member Posts: 304 ■■■□□□□□□□
    Anything on there you need?
    Might be faster to blast it away and rebuild.

    Either way, the important thing is that you get root access.
    Here's the general game plan

    -> Configure the network interface, will this box be set up as a proxy or just a playground? I would just set up basic connectivity and not worry about forwarding just yet essentially you will to configure IP Address/mask , DNS server and default route.
    In Redhat land this can involve modifying three different files, ifcfg-eth0, route-eth0 and resolv.conf (i think..)

    --> create a user account , it's just good habits to have and prerequisite for ssh access, not a good idea to ssh as root.

    ---> Configure SSHD
    Out the box SSHD might be already configured to work however there are couple of things you may want to change:
    Use a non-standard port, TCP port 22 is well known.
    Disable root ssh access, you don't want someone to be able to hack root right off the bat!
    If you think of passwords analogous to lock, then disabling root access via ssh is equivalent to using two locks, the quality of those locks is a wholly different matter.

    Here things a little different with Solaris than RedHat world, even with SSH running, there may be other security features which will make it seem as though SSH isn't working
    ---->IPTables/Firewall, in RH land we use something called IPTables, not sure what the equivalent is, either case, need to be sure , i believe it will permit SSH from TCP port 22 by default, but we just changed the default port in the previous section (if you didn't you can ignore this)

    >SELinux, another security feature from RH world that functions at the kernel level , same issue as above.
  • nerdydadnerdydad Member Posts: 261
    Turgon wrote: »
    All I can do is google for consoling a Netra and see what happens from Putty. Rather shy on command line experience these days on Solaris but we will see!

    Since your mostly Cisco based like me, you are going to be really disappointed when the tab doesn't work. The more and more I lab, the more I try to use it. Although I read somewhere that autocomplete was going to be introduced in Windows Server 8.
  • TurgonTurgon Banned Posts: 6,308 ■■■■■■■■■□
    I have a sh!t load of housework to do tomorrow so probably wont get at it. There are 2 x netras waiting for me to console. Once I get to a prompt I will be ok, but there may be pain with pin outs on cables, setting and other rubbish. Need to get a 'break' to these beasts..

    Certification is essentially windows centric so Im grateful for help I can get even if most people are unfamilar with UNIX. Been 8 years since I had to worry about vi, etc, plumb and ifconfig and jumpstart. It's just a box, but then again, Solaris isn't just a box. You can get a windows box cold on a network in a matter of minutes..these things..I expect to be fiddling around for a long time finding what file to edlit and remembering how to edit it.

    Cool
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    nerdydad wrote: »
    Since your mostly Cisco based like me, you are going to be really disappointed when the tab doesn't work. The more and more I lab, the more I try to use it. Although I read somewhere that autocomplete was going to be introduced in Windows Server 8.

    Tab completion is an effect of the shell, not the terminal. Last time I checked, tab completion worked just fine on Solaris (assuming you're using bash, I can't speak for any other shell)
  • TurgonTurgon Banned Posts: 6,308 ■■■■■■■■■□
    Im just going to put a cable to the serial port hit putty and see what happens. Lots of advice in this thread that I need to digest to understand what to do next.

    How do I edit files on this thing using Putty?
  • exampasserexampasser Member Posts: 718 ■■■□□□□□□□
    Turgon wrote: »
    Im just going to put a cable to the serial port hit putty and see what happens. Lots of advice in this thread that I need to digest to understand what to do next.

    How do I edit files on this thing using Putty?

    You can edit files using vi or nano (don't know if nano is installed by default though). Another way is to use an application such as WinSCP that also lets you edit files in addition to transferring files from and to the remote machine (you need to have SSH configured and running to do this though).
  • dustinmurphydustinmurphy Member Posts: 170
    exampasser wrote: »
    You can edit files using vi or nano (don't know if nano is installed by default though). Another way is to use an application such as WinSCP that also lets you edit files in addition to transferring files from and to the remote machine (you need to have SSH configured and running to do this though).

    Personally, I prefer nano... much easier to edit, however vi is usually available to most distros by default.

    I wouldn't say I'm an expert in Linux, but I know my way around pretty well. I also know how to Google things I don't know. ;) I usually use easier to understand distros, like Ubuntu or CentOS. I like apt-get... it's pretty much like yum, though. My friend had a Solaris box back in the late 90's... I thought it was cool, but had no idea how to do anything with it.
  • exampasserexampasser Member Posts: 718 ■■■□□□□□□□
    Personally, I prefer nano... much easier to edit, however vi is usually available to most distros by default.

    I wouldn't say I'm an expert in Linux, but I know my way around pretty well. I also know how to Google things I don't know. ;) I usually use easier to understand distros, like Ubuntu or CentOS. I like apt-get... it's pretty much like yum, though. My friend had a Solaris box back in the late 90's... I thought it was cool, but had no idea how to do anything with it.

    I too prefer nano. I run CentOS on an older P4 box with OpenVPN configured on it.
  • dustinmurphydustinmurphy Member Posts: 170
    exampasser wrote: »
    I too prefer nano. I run CentOS on an older P4 box with OpenVPN configured on it.

    Well, at work I run a couple of CentOS boxes with Oracle running on them... and I used Ubuntu to setup a good little File server / source control (subversion)

    At home, I have a couple of Ubuntu VM's setup in my "lab" for different things... I used OpenVPN for a while, until I had to re-purpose the laptop I had it running on. It was kind of nice... when I was away from home I could VPN in and get to my resources. :D I'm not away from home much anymore, due to being on disability.. icon_sad.gif Can't wait to go back to work, though. I've been gone for like 9 months... it sucks.
  • DevilWAHDevilWAH Member Posts: 2,997 ■■■■■■■■□□
    Personally, I prefer nano... much easier to edit, however vi is usually available to most distros by default.

    When I see my Friend editing using vi I understand why people use it. If you know it and for large complex editing it comes in to its own. But you really do need to spend a lot of time with it, its not the simple interface of nano.

    But for me I will happly stick with nano :)
    • If you can't explain it simply, you don't understand it well enough. Albert Einstein
    • An arrow can only be shot by pulling it backward. So when life is dragging you back with difficulties. It means that its going to launch you into something great. So just focus and keep aiming.
  • it_consultantit_consultant Member Posts: 1,903
    nerdydad wrote: »
    Since your mostly Cisco based like me, you are going to be really disappointed when the tab doesn't work. The more and more I lab, the more I try to use it. Although I read somewhere that autocomplete was going to be introduced in Windows Server 8.

    You can tab in powershell.
  • nerdydadnerdydad Member Posts: 261
    Awesome, I can't remember what I was trying to do now, but it was from the command line, something like dhclient or something, anyways I typed in dhc and tried to tab it from there and it was a total no go, and I had to remind myself I was not in the Cisco CLI anymore.
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    nerdydad wrote: »
    Awesome, I can't remember what I was trying to do now, but it was from the command line, something like dhclient or something, anyways I typed in dhc and tried to tab it from there and it was a total no go, and I had to remind myself I was not in the Cisco CLI anymore.

    If you're using a tab compliant shell, then if it doesn't come up on tab completion, the command probably wasn't on your path. Fairly common occurrence if you're not working as root. But in bash, tab completion works for anything on the filesystem, commands or files, I use it quite religiously
Sign In or Register to comment.