NSLU2-Linux
view · edit · print · history

The problem:

When (at home, for example) you build your network, the user names you give to Windows users can be more than 8 characters. For example, Mickey Mouse is much more than 8 characters. However, the NSLU2 expects all user names added to be 8 characters or less.

The result of having a long user name is that pass through authentication does not work. Instead of the NSLU2 automatically understanding who you are by the credentials Windows passes the NSLU2, instead you will see a pop-up authentication box where you would have to log in to the NSLU2 with an 8 character or less user name. Not pretty.

The implication:

If you don't use passwords at home and just allow the NSLU2 to be used by all users then you probably don't have a need for the solution provided here. If, however, you do already have long user names and want to keep using them, then...

The solution:

Samba, the software that provides the CIFS protocol on the NSLU2 supports long user names via a mapping system. To use it do the following:

1) Via the web interface (Administration -> Users) and create yourself an 8 character or less user name. For example, with Mickey Mouse I created a user called mickey. Make sure the password chosen is the same password that you use in your workgroup (or, in your Windows host). You can choose any name you like as it will not be seen unless you tell the NSLU2 to also create the Create Private Folder (Share).

2) telnet to your NSLU2.

3) Create /unslung/rc.reset_usrgrpshare

   #!/bin/sh
   /usr/sbin/reset_ugs
   sed -ie 's/username map = no/username map = \/share\/hdd\/conf\/usermap.cfg/' /share/hdd/conf/share/smb.conf
   return 0

4) chmod 755 /unslung/rc.reset_usrgrpshare

5) vi /share/hdd/conf/usermap.cfg [or use an editor you are familiar with]

6) Add your mappings like this and save:

   mickey == "Mickey Mouse"

7) The format above is Unix name == "Windows long name". The quotes are important.

8) /etc/rc.d/rc.reset_usrgrpshare

9) Samba is re-loaded with the new configuration. If you've accessed your NSLU2 over the network and logged in then you should either reboot your PC or from a DOS/Command shell type net use * /delete to ensure Windows has disconnected from the NSLU2.

9) Browse the NSLU2 via Windows explorer. If everything is working correctly you will not be asked to log-in.

---

Unslung 6.8

This is how I added users with long names:

1) Create user via web

2) Create /etc/samba/user_smb.conf

   [global]
   username map = /share/flash/conf/samba/smb_usermap.conf

3) Create /share/flash/conf/samba/smb_usermap.conf

   mickey = "Mickey Mouse"

Be sure to use the right share folders. For me (1 drive connected to USB port 2) the right path is /share/flash/conf

view · edit · print · history · Last edited by gerard.
Based on work by gerard and uSURPER.
Originally by uSURPER.
Page last modified on November 20, 2006, at 12:15 PM