Loading ...
Sorry, an error occurred while loading the content.

Disabling access to ADMIN, DISK 2, etc.

Expand Messages
  • Sean Carolan
    Hi folks: Well, I managed to get unslung 6.8 running on my slug and have a USB memory stick and backup drive connected to it. I also installed NFS so Linux
    Message 1 of 8 , Nov 9, 2006
    • 0 Attachment
      Hi folks:

      Well, I managed to get unslung 6.8 running on my slug and have a USB
      memory stick and backup drive connected to it. I also installed NFS
      so Linux and Mac clients can communicate with it without using samba.
      Here's what I'm wondering:

      1. Is there a way to disable samba sharing of the admin 1, admin 2,
      and disk 2 directories, so they don't show up in Windows networking at
      all? I tried commenting them out in the /etc/samba/smb.conf file but
      they still show up when I browse the workgroup.

      2. Similar situation with NFS - I have commented out all but
      /share/hdd/data/public in the /etc/exports, but it's still sharing out
      all the above mentioned directories on the network.

      Any help is greatly welcome. I just want to have ONE directory
      showing and available, via either NFS or SAMBA.

      Thanks


      Sean
    • Sean Carolan
      Ok, I managed to solve the first problem by editing /etc/samba/smb_user.conf. I set the directories to browseable=no and they don t show up in my doze
      Message 2 of 8 , Nov 9, 2006
      • 0 Attachment
        Ok, I managed to solve the first problem by editing
        /etc/samba/smb_user.conf. I set the directories to "browseable=no"
        and they don't show up in my 'doze computer anymore.

        Any ideas on how to NOT export NFS directories from the slug?
      • siegfried
        What are my options for writing a minimal program to run on the NSLU2? (1) Can I do both native and cross compiles for both Unslung and OpenSlug? (2)
        Message 3 of 8 , Dec 15, 2006
        • 0 Attachment
          What are my options for writing a minimal program to run on the NSLU2?

          (1) Can I do both native and cross compiles for both Unslung and
          OpenSlug?

          (2) Where is the URL for downloading the cross development platform?

          (3) Is there a URL for a tutorial on how to write "hello world"?

          (4) Is there an emulator that will run on a PC?



          Thanks,

          Siegfried



          [Non-text portions of this message have been removed]
        • Brian Zhou
          ... For unslung cross compilation, see http://www.nslu2-linux.org/wiki/Optware/AddAPackageToOptware follow the step up to make directories , then make
          Message 4 of 8 , Dec 15, 2006
          • 0 Attachment
            --- In nslu2-general@yahoogroups.com, "siegfried" <siegfried@...> wrote:
            >
            > What are my options for writing a minimal program to run on the NSLU2?
            >
            > (1) Can I do both native and cross compiles for both Unslung and
            > OpenSlug?
            >
            > (2) Where is the URL for downloading the cross development platform?
            >
            > (3) Is there a URL for a tutorial on how to write "hello world"?
            >
            > (4) Is there an emulator that will run on a PC?
            >
            >
            >
            > Thanks,
            >
            > Siegfried
            >
            >
            >
            > [Non-text portions of this message have been removed]
            >

            For unslung cross compilation, see
            http://www.nslu2-linux.org/wiki/Optware/AddAPackageToOptware follow
            the step up to "make directories", then "make toolchain", this will
            start the building of cross compiler toolchain. When it's finished,
            you'll have the toolchain binaries available at
            toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/ directory.

            For unslung native compilation, see
            http://www.nslu2-linux.org/wiki/HowTo/NativelyCompileUnslungPackages
            the native toolchain is from the crosstool-native package.

            For "Hello world", see
            http://shootout.alioth.debian.org/gp4/benchmark.php?test=hello&lang=all
            in particular, the "C gcc" and "C++ g++" links.

            The SlugOS/BE native gcc is in gcc ipkg.

            For SlugOS/BE cross compilation toolchain, see
            http://www.nslu2-linux.org/wiki/Development/MasterMakefile

            Cheers,

            -Brian Zhou
          • lance_benson
            ... NSLU2? Siegfried, Here are instructions I wrote up a year and a half ago. They are based on very little linux knowledge, so may be too detailed for your
            Message 5 of 8 , Dec 16, 2006
            • 0 Attachment
              --- In nslu2-general@yahoogroups.com, "siegfried" <siegfried@...>
              wrote:
              >
              >How to write and execute "hello world" for/on NSLU2?
              >
              > What are my options for writing a minimal program to run on the
              NSLU2?

              Siegfried,

              Here are instructions I wrote up a year and a half ago. They are
              based on very little linux knowledge, so may be too detailed for your
              use.

              Howto compile simple C program

              NSLU2 "Hello, World" C Program on unslung 5.5

              Here is how I managed to set up the NSLU2 to natively compile a
              simple "Hello, World" C program.
              I've tried to put in enough detail so that someone who doesn't know
              linux well can follow.
              This is at a very simple level for linux experts, but others may find
              it helpful.

              This document gives sample use of these commands or programs: ipkg
              DO_Reboot ps mkdir chown vi cat login pwd printenv gcc ls

              To find the documentation for any of the commands used here, search
              on the web, e.g. for "man mkdir".

              Immediately after unslinging and rebooting (because of conflicts when
              other packages had been installed first) telnet in and install the
              native compilation package

              # ipkg update
              # ipkg install unslung-feeds (if you haven't already done this)
              # ipkg update
              # ipkg install unslung-devel (this may take 15-20 minutes on a
              de-underclocked slug)
              (this in accordance with
              http://www.nslu2-linux.org/wiki/HowTo/NativelyCompileUnslungPackages)

              To make sure that the gcc compiler was installed properly,
              type "find / -name gcc". It should be in /opt/bin.

              Now follow the rest of the suggestions for setting up a user account
              to run your C compiler from (so you don't mess with the root
              directories).

              In the Linksys interface, create a new user, e.g., xyz. On the slug,
              the passwd command would enforce a complex password, with upper and
              lower case letter and numbers, so here you might use something
              like "xyz0Xyz".

              Next get secure access by installing dropbear

              # ipkg install dropbear (to run SSH daemon:
              http://www.nslu2-linux.org/wiki/HowTo/UseDropBearForRemoteAccess)

              Record the md5 fingerprints for confirmation later, something like
              md5 55:4f:d9:93:02:98:d7:20:1b:da:bc:cc:2b:52:49:f4

              reboot (# DO_Reboot), telnet back in, and check to see that dropbear
              is running
              (# ps -ef and look for something like "692 root 1628 S dropbear")

              Now install an SSH client like Putty (for a Windows PC). Download
              and install from http://www.chiark.greenend.org.uk/~sgtatham/putty/

              Start Putty and connect to your slug, e.g. to 192.168.1.77. If the
              connection succeeds Putty will give you the md5 number that it found
              on the slug--it should match the first of the two that you recorded
              earlier. If it does press <Enter> and your secure connection should
              be complete. Sign in as root with the password you established when
              you unslung.

              Now continue setting up the user account. When you created user xyz
              with the Linksys interface, it put it in your public directory,
              e.g. /public/xyz (which is an alias for /share/hdd/data/public). You
              may, instead, want it someplace that is not shared on your net.
              Following one of many possible linux conventions, the following
              creates the directory in /home/user, and creates src and bin
              directories for the C source and the executable (binary) program:

              # mkdir /home/user/xyz
              # mkdir /home/user/xyz/src
              # mkdir /home/user/xyz/bin

              To make xyz the owner of this directory, and its contents:

              # chown -R xyz /home/user/xyz

              In order to give xyz a way to execute the gcc compiler which you have
              installed, and other programs, create a file called .profile
              (Commands for the vi editor may be found at
              http://www.chem.brown.edu/instructions/vi.html):

              # vi /home/user/xyz/.profile
              ("i" enters insert mode,
              type "PATH=/bin:/sbin:/opt/bin:/opt/sbin:/home/user/xyz/bin" (without
              quotes), <ESC>, ZZ (to save and exit))

              Next modify the password file to change the home directory of xyz,
              and to use the bash shell

              # vi /etc/passwd

              Edit the xyz line to replace the text after the second-to-last colon
              (":") with "/home/user/xyz:/sbin/bash"

              When you've exited vi, you can use the following command to print the
              file to the screen to see that it looks right

              # cat /etc/passwd

              Now you can login to xyz and enter your password

              # login xyz

              To make sure that you are in the user directory

              # pwd
              /home/user/xyz (should be the response)

              To make sure that your path is correct

              # printenv (should include:
              PATH=/bin:/sbin:/opt/bin:/opt/sbin:/home/user/xyz/bin)

              Now you can create your source file

              # vi src/hello.c (enter insert mode, type "int main() { printf
              ("Hello, World\n"); return(0); }", <ESC> ZZ<Enter> to save and exit)
              # gcc src/hello.c -o bin/hello
              # ls -l bin (should tell you that "hello" is in bin, it is
              owned by xyz, and is executable for owner, group, and everyone
              # hello (this should run the program)
              Hello, World (this should be the program's output)

              Now you should be able to create C programs, simple and not so
              simple. More complex programs can be built with make, and the slug's
              much more complicated packages can be built natively, although
              crosscompilation is the recommended method. This process used many
              of the basic linux commands that I have learned in trying to figure
              out my way into linux for the first time.

              Amendments and elaborations invited.
            • siegfried
              ... These directions say to add a user so I don t clobber some files. How do I do this? I tried adding a user via the web interface called siegfried but ssh
              Message 6 of 8 , Dec 26, 2006
              • 0 Attachment
                >For unslung native compilation, see

                >http://www.nslu2-linux.org/wiki/HowTo/NativelyCompileUnslungPackages

                >the native toolchain is from the crosstool-native package.

                >



                These directions say to add a user so I don't clobber some files. How do I
                do this? I tried adding a user via the web interface called "siegfried" but
                ssh did not accept this as a log in.

                While logged in from the root account, I tried the command "adduser" but
                that did not work either.



                Could someone kindly tell me how to do this?

                Thanks!

                Siegfried



                [Non-text portions of this message have been removed]
              • siegfried
                Please ignore my previous email! I found these great instructions. However, I m having trouble. ... Here is what I get: bash-3.2$ ssh -p 22 root@10.169.1.10
                Message 7 of 8 , Dec 26, 2006
                • 0 Attachment
                  Please ignore my previous email!



                  I found these great instructions. However, I'm having trouble.



                  >

                  ># mkdir /home/user/xyz

                  ># mkdir /home/user/xyz/src

                  ># mkdir /home/user/xyz/bin

                  >

                  >To make xyz the owner of this directory, and its contents:

                  >

                  ># chown -R xyz /home/user/xyz

                  >

                  >In order to give xyz a way to execute the gcc compiler which you have

                  >installed, and other programs, create a file called .profile

                  >(Commands for the vi editor may be found at

                  >http://www.chem.brown.edu/instructions/vi.html):

                  >

                  ># vi /home/user/xyz/.profile

                  >("i" enters insert mode,

                  >type "PATH=/bin:/sbin:/opt/bin:/opt/sbin:/home/user/xyz/bin" (without

                  >quotes), <ESC>, ZZ (to save and exit))

                  >

                  >Next modify the password file to change the home directory of xyz,

                  >and to use the bash shell

                  >

                  ># vi /etc/passwd

                  >

                  >Edit the xyz line to replace the text after the second-to-last colon

                  >(":") with "/home/user/xyz:/sbin/bash"

                  >

                  >When you've exited vi, you can use the following command to print the

                  >file to the screen to see that it looks right

                  >

                  ># cat /etc/passwd

                  >

                  >Now you can login to xyz and enter your password

                  >

                  ># login xyz

                  >



                  Here is what I get:



                  bash-3.2$ ssh -p 22 root@10.169.1.10

                  root@10.169.1.10's password:



                  Welcome to Unslung V2.3R63-uNSLUng-6.8-beta



                  ---------- NOTE: THIS SYSTEM IS CURRENTLY UNSLUNG ----------





                  BusyBox v0.60.4 (2005.03.22-06:52+0000) Built-in shell (ash)

                  Enter 'help' for a list of built-in commands.



                  # login siegfried

                  Password:

                  No directory, logging in with HOME=/



                  Welcome to Unslung V2.3R63-uNSLUng-6.8-beta



                  ---------- NOTE: THIS SYSTEM IS CURRENTLY UNSLUNG ----------





                  BusyBox v0.60.4 (2005.03.22-06:52+0000) Built-in shell (ash)

                  Enter 'help' for a list of built-in commands.



                  $



                  I cannot cd into /home/user/siegfried



                  I tried doing chmod 777 /home/user but this did not help!



                  What am I doing wrong?

                  Thanks,

                  Siegfried



                  [Non-text portions of this message have been removed]
                • siegfried
                  It looks like the information in Lances reply is not on the wiki (at http://www.nslu2-linux.org/wiki/HowTo/NativelyCompileUnslungPackages) and I see one of
                  Message 8 of 8 , Jan 2, 2007
                  • 0 Attachment
                    It looks like the information in Lances reply is not on the wiki (at
                    http://www.nslu2-linux.org/wiki/HowTo/NativelyCompileUnslungPackages) and I
                    see one of the rules is to update the wiki when new information is
                    dispersed.



                    If I could get some help on creating a non-root account for native
                    compilation, I would update the wiki! As you can see, when I log into the
                    siegfried account I tried to create for myself, it tells me that I don't
                    have access to /HOME. Can someone please help me understand what chmod or
                    chown commands I need to apply to the file user to rememdy this problem?



                    Thanks,

                    Siegfried



                    _____

                    From: nslu2-general@yahoogroups.com [mailto:nslu2-general@yahoogroups.com]
                    On Behalf Of siegfried
                    Sent: Tuesday, December 26, 2006 11:23 PM
                    To: nslu2-general@yahoogroups.com
                    Subject: RE: [nslu2-general] Re: How to write and execute "hello world"
                    for/on NSLU2?



                    Please ignore my previous email!

                    I found these great instructions. However, I'm having trouble.

                    >

                    ># mkdir /home/user/xyz

                    ># mkdir /home/user/xyz/src

                    ># mkdir /home/user/xyz/bin

                    >

                    >To make xyz the owner of this directory, and its contents:

                    >

                    ># chown -R xyz /home/user/xyz

                    >

                    >In order to give xyz a way to execute the gcc compiler which you have

                    >installed, and other programs, create a file called .profile

                    >(Commands for the vi editor may be found at

                    >http://www.chem <http://www.chem.brown.edu/instructions/vi.html>
                    brown.edu/instructions/vi.html):

                    >

                    ># vi /home/user/xyz/.profile

                    >("i" enters insert mode,

                    >type "PATH=/bin:/sbin:/opt/bin:/opt/sbin:/home/user/xyz/bin" (without

                    >quotes), <ESC>, ZZ (to save and exit))

                    >

                    >Next modify the password file to change the home directory of xyz,

                    >and to use the bash shell

                    >

                    ># vi /etc/passwd

                    >

                    >Edit the xyz line to replace the text after the second-to-last colon

                    >(":") with "/home/user/xyz:/sbin/bash"

                    >

                    >When you've exited vi, you can use the following command to print the

                    >file to the screen to see that it looks right

                    >

                    ># cat /etc/passwd

                    >

                    >Now you can login to xyz and enter your password

                    >

                    ># login xyz

                    >

                    Here is what I get:

                    bash-3.2$ ssh -p 22 root@10.169. <mailto:root%4010.169.1.10> 1.10

                    root@10.169. <mailto:root%4010.169.1.10> 1.10's password:

                    Welcome to Unslung V2.3R63-uNSLUng-6.8-beta

                    ---------- NOTE: THIS SYSTEM IS CURRENTLY UNSLUNG ----------

                    BusyBox v0.60.4 (2005.03.22-06:52+0000) Built-in shell (ash)

                    Enter 'help' for a list of built-in commands.

                    # login siegfried

                    Password:

                    No directory, logging in with HOME=/

                    Welcome to Unslung V2.3R63-uNSLUng-6.8-beta

                    ---------- NOTE: THIS SYSTEM IS CURRENTLY UNSLUNG ----------

                    BusyBox v0.60.4 (2005.03.22-06:52+0000) Built-in shell (ash)

                    Enter 'help' for a list of built-in commands.

                    $

                    I cannot cd into /home/user/siegfried

                    I tried doing chmod 777 /home/user but this did not help!

                    What am I doing wrong?

                    Thanks,

                    Siegfried

                    [Non-text portions of this message have been removed]





                    [Non-text portions of this message have been removed]
                  Your message has been successfully submitted and would be delivered to recipients shortly.