NSLU2-Linux
view · edit · print · history

HowTo.AddUsersWithLongNames History

Hide minor edits - Show changes to markup

November 20, 2006, at 12:15 PM by gerard --
Changed line 56 from:
   mickey == "Mickey Mouse"
to:
   mickey = "Mickey Mouse"
November 20, 2006, at 12:11 PM by gerard --
Changed line 51 from:
   [lobal]
to:
   [global]
Changed line 58 from:

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

to:

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

November 20, 2006, at 12:11 PM by gerard -- howto for unsung 6.8
Added lines 41-58:

---

Unslung 6.8

This is how I added users with long names:

1) Create user via web

2) Create /etc/samba/user_smb.conf

   [lobal]
   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

January 21, 2005, at 11:13 AM by uSURPER --
Changed line 36 from:

8) /etc/rc.d/rc.reset_usdrgrpshare

to:

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

January 21, 2005, at 11:07 AM by uSURPER --
Changed line 19 from:

3) Create (or edit) /unslung/rc.samba

to:

3) Create /unslung/rc.reset_usrgrpshare

Added line 22:
   /usr/sbin/reset_ugs
Changed line 24 from:
   return 1
to:
   return 0
Changed line 26 from:

4) chmod 755 /unslung/rc.samba

to:

4) chmod 755 /unslung/rc.reset_usrgrpshare

Changed lines 36-38 from:

8) Reboot your NSLU2 so that 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.

to:

8) /etc/rc.d/rc.reset_usdrgrpshare

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.

January 21, 2005, at 09:33 AM by uSURPER --
Changed line 19 from:

3) vi /share/hdd/conf/smb.conf [or use an editor you are familiar with]

to:

3) Create (or edit) /unslung/rc.samba

Changed lines 21-22 from:

4) Search for the following line:

   username map = no
to:
   #!/bin/sh
   sed -ie 's/username map = no/username map = \/share\/hdd\/conf\/usermap.cfg/' /share/hdd/conf/share/smb.conf
   return 1
Changed lines 25-26 from:

5) Replace the line and save with:

   username map = /share/hdd/conf/usermap.cfg
to:

4) chmod 755 /unslung/rc.samba

Changed line 27 from:

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

to:

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

Changed line 29 from:

7) Add your mappings like this and save:

to:

6) Add your mappings like this and save:

Changed line 33 from:

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

to:

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

Changed line 35 from:

9) Reboot your NSLU2 so that 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.

to:

8) Reboot your NSLU2 so that 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.

Changed line 37 from:

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

to:

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

January 13, 2005, at 10:00 PM by uSURPER --
Changed lines 1-37 from:

Describe AddUsersWithLongNames here.

to:

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) vi /share/hdd/conf/smb.conf [or use an editor you are familiar with]

4) Search for the following line:

   username map = no

5) Replace the line and save with:

   username map = /share/hdd/conf/usermap.cfg

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

7) Add your mappings like this and save:

   mickey == "Mickey Mouse"

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

9) Reboot your NSLU2 so that 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.

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

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