Hacking devices can/will void your warranty and can turn your expensive consumer electronics into worthless trash if you don't know what you're doing. This blog is for information purposes only, and if you try to hack into your own consumer electronics, you do so at your own risk. The device I'm currently hacking is the Canon SX10 IS camera.

Tuesday, November 3, 2009

smbpasswd

Inspired from a forum post on the wiki, I decided to try to get smbpasswd going.

The post includes everything needed to set it up. The highlights are:
1) mount -o rw,remount /
2) vi /usr/local/samba/lib/smb.conf
3) Press i. modify the smb.conf.
4) change guest ok = yes to guest ok = no on whichever share you want to restrict. Adding shares is already documented on the wiki.
5) save the smb.conf file (press esc key followed by :wq )

Now you need smbpasswd. I've stuck it out there at: http://www.box.net/shared/l6kbxxb5pn
But the question is how did I make it?
351H_AP_GL ellion source that I blogged about earlier had the samba in system/branch_src_sharedmemory_integration/Utility/samba/Samba-3.0.23C. So I brought up my fedora virtual machine, switched to that directory and ran make. It built all of the samba stuff. mipsel-linux-strip on the smbpasswd file when it was finished, and copied it to my screenplay.

Since my screenplay is currently ext3, I didn't have to do a chmod to make it executable as it was already marked executable. I think the NTFS may do that too, but if it doesn't you'll need to move it onto one of the ext3 drives. Anyway, executed smbpasswd -a root and it added a root user with the password I gave it to the /etc/smbpasswd data file. I did this on my root share that I added, so now when I browse there, it prompts for password (username defaults to guest, grayed out), which I use the root smbpassword I set up and it opens. If I browse to the ScreenPlay share or my USB share, it just opens immediately, does not prompt for password. That's actually an added bonus, since it used to ask for my password and there was none so I just click OK and it would open it.

4 comments:

  1. Hi,
    I want to say thank you for your contribution to Iomega screenplay blog. I'm fairly new to Linux and work mostly with window. I'm trying to follow instruction on how to set up password on root but got stuck on this command "smbpasswd -a root". the error keeps on saying "smbpasswd: not found". Could you please kind enough walk me through step by step? Thank you.

    ReplyDelete
  2. Ok, after running steps 1-5 and downloading the smbpasswd from the link I have in the post, copy the smbpasswd to /bin.

    cp /tmp/hddmedia/smbpasswd /bin/smbpasswd

    (that assumes that you put the smbpasswd on the top level directory of the screenplay as seen from Windows)

    chmod a+x /bin/smbpasswd
    (that will change the command to be executable.)

    Now you should be able to run the smbpasswd command:
    smbpasswd -a root

    I'm doing this comment mostly from memory, so write back if something isn't right. This is an older post made before the 1.98 firmware release, so I'm not sure how all of this will work with the newer firmware if you are using that

    ReplyDelete
  3. Hmm, well after editing the comment it still doesn't show the spaced really well but there is supposed to be a space between cp and /tmp/hddmedia/smbpasswd and /bin/smbpasswd.

    ReplyDelete
  4. Hi Joman100,
    Thank you so much for your instruction. I now would be able to put password on Root folder. Anyway, there seems to be a bug that windows keeps telling me "wrong password" when I first type my root password and if I try it again the message pops up saying "root is not accessible and you don't have permission to use the network". I know for sure I entered the correct password and as soon as I close this error message box, I would be able to browse the root folder fine. If I pretend to enter twice wrong password, I wouldn't be able to get in the root folder even the error message is the same as the correct password. Another word, this thing works just the message is not intuitive. Anyway thank you for all your help. -Simon

    ReplyDelete