Samba Problem


BenScar

What does this do again?
Joined
Jan 4, 2006
Messages
435
Age
48
Location
UK, Near London, somewhere...
Website
Visit site
Hello All,

I'm using my 2x connected to my work laptop. This machine normally (and is currently) logged onto an Active Directory. The file sharing is done using my domain (OK not quite right for an AD but it'll do) log on to verify me against the shares.
Problem is, once the USB network is set up to the 2x, it give me this:
logon4kl.jpg


Now I believe I need to edit something to do with the Samba config on the 2x (like setting up a user) but I don't know linux and need a hand!

Can anyone tell me (step by step preferably) what needs editing?

Thanks
 
Have you tried using command prompt to create a net use instruction?

Something like:
net use P: \\gp2x\gp2x
 
Have you tried using command prompt to create a net use instruction?

Something like:
net use P: \\gp2x\gp2x

I haven't yet.
/Me powers up the 2x

Thought I might get this:
Code:
D:\profiles\ScarboroB>net use P: \\gp2x\gp2x
The password is invalid for \\gp2x\gp2x.

To connect gp2x\Guest to gp2x, press ENTER, or type a new user name:<pressed ENTER>
Enter the password for 'gp2x\Guest' to connect to 'gp2x':<pressed ENTER>
System error 1326 has occurred.

Logon failure: unknown user name or bad password.

I believe my WinXP won't allow me to have blank passwords (which is what Guest has on the 2x, AFAIK) as that's part of the domain security.
This all works fine on my home machine, which is in work group mode, not connecting to any servers.

Any other ideas? :)
 
Last edited by a moderator:
You can force "net" to use a username with the /user switch, but I couldn't get gp2x\root to work before my batteries died, and I haven't got a compatible PSU with me, I'm afraid.

Maybe somebody can help.

Have you tried creating a Guest user on the GP2X and setting a password using a shell script?
 
You can force "net" to use a username with the /user switch, but I couldn't get gp2x\root to work before my batteries died, and I haven't got a compatible PSU with me, I'm afraid.
If I remember rightly there's no password on the root user (if it's the same one I use for Telnetting in), so I think I'd get the same problem.

Maybe somebody can help.

Have you tried creating a Guest user on the GP2X and setting a password using a shell script?
That's the part I need the help with, I have no idea how to do that in Linux. Windows, no problem (right click My Computer and do Manage :) ), but Linux is something I need to learn (or at least want to!).

How do I make a user and assign that user a password?
I assume there's a command I can issue from the Telnet prompt but I've not found it yet.

Anyway, time for bed. I will return tomorrow :)
Thanks for you help so far Wite_Noiz.

EDIT:
Code:
D:\profiles\ScarboroB>net use P: \\gp2x\gp2x /USER:gp2x\root
The command completed successfully.
Tried that and volia, I can get access to the share. Yet it won't let me enter that in the Username/password box when it pops up. Even tried it as a "connect network drive" and specifing a different user.

I'll hve to test it again after I wake up tomorrow, but it looks like that works!

I thank you again Wite_Noiz
 
Last edited by a moderator:
Maybe somebody can help.

Have you tried creating a Guest user on the GP2X and setting a password using a shell script?
That's the part I need the help with, I have no idea how to do that in Linux. Windows, no problem (right click My Computer and do Manage :) ), but Linux is something I need to learn (or at least want to!).

How do I make a user and assign that user a password?
I assume there's a command I can issue from the Telnet prompt but I've not found it yet.
For general users, as root, you'd type "adduser wibble" or "useradd wibble" - most linux systems support both, and I can never remember which is which, though one of them asks some useful questions, while the other just creates the user. To set the password for a user, type "passwd wibble" and follow the prompts. I don't know how much of this applies to the gp2x - if they haven't provided passwd then you'll need to hack /etc/passwd by hand.

For samba, though, you often need to create special Samba users instead - they don't necessarily have to match real users on the system. To manage Samba users, you use smbpasswd - e.g. "smbpasswd -a wibble" to add a user. To some extent this depends on your samba configuration - one thing you can do is make Samba join your domain, in which case it just uses your domain's users - and again I don't know how much of this applies on the gp2x.

EDIT:
Code:
D:\profiles\ScarboroB>net use P: \\gp2x\gp2x /USER:gp2x\root
The command completed successfully.
Tried that and volia, I can get access to the share. Yet it won't let me enter that in the Username/password box when it pops up. Even tried it as a "connect network drive" and specifing a different user.
Windows security = so long as it's not possible from the GUI, that's OK
 
Last edited by a moderator:
For general users, as root, you'd type "adduser wibble" or "useradd wibble" - most linux systems support both, and I can never remember which is which, though one of them asks some useful questions, while the other just creates the user. To set the password for a user, type "passwd wibble" and follow the prompts.
Thanks that's what I needed (at least that's what I asked for :) )

I don't know how much of this applies to the gp2x - if they haven't provided passwd then you'll need to hack /etc/passwd by hand.
Might have to find out, see what else I can learn.

For samba, though, you often need to create special Samba users instead - they don't necessarily have to match real users on the system. To manage Samba users, you use smbpasswd - e.g. "smbpasswd -a wibble" to add a user. To some extent this depends on your samba configuration - one thing you can do is make Samba join your domain, in which case it just uses your domain's users - and again I don't know how much of this applies on the gp2x.
Well only one way to find out, if I get a chance today I'll plug up and see what I can see.
Might try and monitor the files in te samba config files as well, see if any of the changes get written back to the 2x. Got my fingers crossed!

Windows security = so long as it's not possible from the GUI, that's OK

Thanks gfoot.
hehehe, so very true.
Although have you tried Vista yet. On boot up it asked if EVERY application should be allowed (including the virus checker :) ) This did get very annoying. That's for another forum though!
 
Last edited by a moderator:
hehehe, so very true.
Although have you tried Vista yet. On boot up it asked if EVERY application should be allowed (including the virus checker :) ) This did get very annoying. That's for another forum though!
And is an 'apparent' known bug that will be fixed for the next release.
Honestly, I'm looking forward to Vista...

Sorry for not answering your user question, was feeling tired and didn't read the whole post; just saw "Thanks for you help so far Wite_Noiz" *head grows* ;)

Let us know how you get on and if you need any help setting up Linux/Samba users...

I've started drafting a more in-depth guide to setting up Samba (both ways) and will include this information in it incase others get the same problem.
 
Last edited by a moderator:
And is an 'apparent' known bug that will be fixed for the next release.
Honestly, I'm looking forward to Vista...
I'm half and half at the moment, looking forward to it not asking as many questions and the way it looks.
Although a couple of my machine won't be up to spec to run the OS! Using the standard built in gfx cards it'll run like a dog.

Sorry for not answering your user question, was feeling tired and didn't read the whole post; just saw "Thanks for you help so far Wite_Noiz" *head grows* ;)
No worries at all, not like it was life or death :) Not yet anyway *grin*
Got me where I needed to be with you /user:root thing, so strange that it works.
Hibinated the laptop last night, started it again this morning and it's still retained the credentials :) Didn't have to CMD it back in. Gotta love windows sometimes.

Let us know how you get on and if you need any help setting up Linux/Samba users...

I've started drafting a more in-depth guide to setting up Samba (both ways) and will include this information in it incase others get the same problem.
Some thing you might like to put in your guide. I see lots of people saying to use the MkDir to make a "dev" under the mnt folder. That's all well and good if you're using a telnet prompt to run things. If you want to use the interface you'll have to mount it as ext (or even nand) though so it's useable in the menus. OK this means that your USB drives won't show up but that can be mentioned as well I guess.

I now have Samba working both ways, a simple gpu on the 2x to start it from that end and a BAT file to do he same on the PC.

Is there a way of getting ALL the USB networking started without having to go into the Settings/System menu on the 2x? (guessing there is, as it's executing linux commands when you select those options)
That way I could have one script that will start off all the services and get samba working with little effort (yeah I know, I'm lazy :) )

Thanks again, you did help :)
Ben
---
 
Last edited by a moderator:
Although a couple of my machine won't be up to spec to run the OS! Using the standard built in gfx cards it'll run like a dog.
Apparently, Vista will use Classic or Whistler (Aero, was it?) UI if you can't support the new one

Is there a way of getting ALL the USB networking started without having to go into the Settings/System menu on the 2x? (guessing there is, as it's executing linux commands when you select those options)
That way I could have one script that will start off all the services and get samba working with little effort (yeah I know, I'm lazy :) )
I can't answer that off the top of my head, but I'll look in to it.
I'm probably going to include some gpu and shell scripts that do that kind of thing in the guide.
 
Last edited by a moderator:
Apparently, Vista will use Classic or Whistler (Aero, was it?) UI if you can't support the new one
That makes sense. Aero is the new one I believe, the "Windows Foundation Layer" thingy. Cools fun!
Classic would do me though, as long as it's more secure ;)

I can't answer that off the top of my head, but I'll look in to it.
I'm probably going to include some gpu and shell scripts that do that kind of thing in the guide.
I will await your guide with antisipation (sp?). Of course I'll have a look myself at the same time, can't let people do everything for me ;)
 
Last edited by a moderator:
Although a couple of my machine won't be up to spec to run the OS! Using the standard built in gfx cards it'll run like a dog.
Apparently, Vista will use Classic or Whistler (Aero, was it?) UI if you can't support the new one

Is there a way of getting ALL the USB networking started without having to go into the Settings/System menu on the 2x? (guessing there is, as it's executing linux commands when you select those options)
That way I could have one script that will start off all the services and get samba working with little effort (yeah I know, I'm lazy :) )
I can't answer that off the top of my head, but I'll look in to it.
I'm probably going to include some gpu and shell scripts that do that kind of thing in the guide.

if you want to run the client, add insmod smbfs to the rcsys.init (not sure if i spelled it correct, its in etc/rc.d) file
 
Last edited by a moderator:
if you want to run the client, add insmod smbfs to the rcsys.init (not sure if i spelled it correct, its in etc/rc.d) file
When would that run the Samba client, would it be every time the 2x starts up?
Yes.

The only thing I havnt got working yet is the automatic mount of the share, you would still have to do it manually (I think the fstab should do it, just havnt gotten it to take)
 
Last edited by a moderator:
Back
Top