Author Topic: Samba Conf  (Read 4245 times)

keef

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Samba Conf
« on: September 18, 2005, 01:34:56 pm »
hi

Since flashing the latest cacko ROM most stuff works
but i can no longer connect to the Z from my mac over wifi.

I would like to edit the samba.conf file as i think this may be the problem.
it puts the workgroup name as zaurus rather than WORKGROUP like other computers on the network.
If i open this file in tree text to edit it will not allow me to save any changes.
i have given the program root priveliges but still no luck.


any ideas appreciated


keef


c860 cacko lite
« Last Edit: September 18, 2005, 01:35:38 pm by keef »

Jacknife

  • Newbie
  • *
  • Posts: 46
    • View Profile
Samba Conf
« Reply #1 on: September 20, 2005, 03:08:19 am »
I'm not familiar with the c860 nor cacko lite, but I'd first recommend checking the file attributes to see if it's read-only, only editable by root, "disk" is not full, etc.  I'd also check your mount points to ensure that the location where the file resides is not mounted as a read-only partition.  Hope this helps.

keef

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Samba Conf
« Reply #2 on: September 20, 2005, 03:56:33 am »
Hi
Thanks for the reply.
When I check the file properties it is ticked as read and write next to owner:
group: is ticked as read and other: is ticked as read.

Not sure how to check the mount list?


Thanks again,



keef

Jacknife

  • Newbie
  • *
  • Posts: 46
    • View Profile
Samba Conf
« Reply #3 on: September 20, 2005, 04:32:13 am »
Quote
When I check the file properties it is ticked as read and write next to owner:
group: is ticked as read and other: is ticked as read.

Not sure how to check the mount list?[div align=\"right\"][a href=\"index.php?act=findpost&pid=96360\"][{POST_SNAPBACK}][/a][/div]
Is the owner of the configuration file "root", or "zaurus"?  If the file is owned by root then you'll need to su to root in order to modify the file. You can use the df command to find where a directory/file is mounted:

df -h  /usr/local/samba/lib/smb.conf

The above command will display a columnized display with the right-hand column showing where the file/directory is mounted.  

You can use "mount -l" (lowercase L) to display the mounting information.  If the partition contains "ro"  in the mount permissions (extreme right-hand entry of each line), then the partition has been mounted as read-only and cannot be edited unless remounted as read/write.  I wouldn't recommend doing this however, until you become more familiar with mount points. Additionally, mount points may also be found within the /etc/mtab and /etc/fstab.  Hope this helps...

keef

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Samba Conf
« Reply #4 on: September 20, 2005, 03:06:08 pm »
Hi,

The owner of the file is root.
I have enabled root priveleges on the text editor but still no luck.

Tried this command: df -h  /usr/local/samba/lib/smb.conf[/b]

and get:  can't find mount point


keef

Jacknife

  • Newbie
  • *
  • Posts: 46
    • View Profile
Samba Conf
« Reply #5 on: September 21, 2005, 02:53:12 am »
Quote
The owner of the file is root.
I have enabled root priveleges on the text editor but still no luck.

Tried this command: df -h  /usr/local/samba/lib/smb.conf
and get:  can't find mount point
[div align=\"right\"][a href=\"index.php?act=findpost&pid=96439\"][{POST_SNAPBACK}][/a][/div]
Since the file is owned by root, you'll need to switch user mode to root via the "su" command.  Type su on the command-line by itself to switch to the root user account.  Hopefully you have a password set for the root account, otherwise just press enter when/if prompted for the user password.

You may use the command whoami to verify that you are root after switching.  Once you're on as root, you may edit the configuration file.  Once you've edited the file, make sure you switch back to your normal zaurus account as soon as possible by exiting switched user mode (exit).

As for the path ( /usr/local/samba/lib/smb.conf) that I mentioned earlier, that was just an example path where the samba configuration file may reside.  It could reside elsewhere on your system.  I'm assuming that since you are able to view the file attributes for the configuration file, that you know where the file is located.  Simply substitue that path for the one I used in my "df -h  /usr/local/samba/lib/smb.conf" example.  You may also use the df as follows to show where the current directory is mounted:

df -h .

...Make sure that there's a space between the -h and the period.  Hope this helps.
« Last Edit: September 21, 2005, 02:58:04 am by Jacknife »

keef

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Samba Conf
« Reply #6 on: September 21, 2005, 03:09:46 pm »
Hi

Maybe I'm being a bit slow!!!

I can log in as root fine in the console.

when i type /etc/samba/smb.conf which is the path of the file i get: Permission denied.

i can type:  df -h  /etc/samba/smb.conf

which gives:  Filesystem                Size      Used Available Use% Mounted on
/dev/loop0               12.8M     12.8M         0 100% /usr
#

when using the sharp rom i could seem to edit any file using the text editor.


keef

bluedevils

  • Hero Member
  • *****
  • Posts: 1284
    • View Profile
    • http://
Samba Conf
« Reply #7 on: September 21, 2005, 03:40:03 pm »
The text editer only runs as the zaurus user (at least mine does).  From the console su to root
Code: [Select]
su - and then start the text editor
Code: [Select]
textedit  Hopefully that will help.  You may want to learn vi on your spare time.
I'm now an iphone user and use my zaurii as serial terminals, perl and shell scripting and when I need 640x480 screens

sl-c3100/pda cacko 1.23 | sl-6000l/needs battery | sl-c760/server pdaxrom rc12 | Former sl-5500/tkcrom owner (sister's birthday gift)

keef

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Samba Conf
« Reply #8 on: September 21, 2005, 04:53:30 pm »
apologies in advance!!!

ok

log in as su  and start the text editor

edit the file and try to save:

cannot save the file as you do not have permission or the file may be in use


keef

Ragnorok

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
    • http://
Samba Conf
« Reply #9 on: October 21, 2005, 06:37:45 pm »
- On Cacko 1.23 RC17, smb.conf is symlinked to /usr/lib.rom/smb.conf, which is read-only, so even root can't save it.  What I did was copy it to a different name under its /home/etc directory, then delete the symlink, the copy it to /home/etc/smb.conf.  That way I can edit the one that's there, and I have a copy of the original in same dir so I don't have to remember where it is in the "ROM" area.
- Hope this helps...
| I shed a tear for the passing of Hiroshi; he served me well
| Zaurus zealot since Nov 2002, PDA user since Oct 1991
| Replaced Z with UMID BZ February 2010

keef

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Samba Conf
« Reply #10 on: October 21, 2005, 07:43:02 pm »
Hey thanks for the reply,

i think i have managed to do this (see thread in the mac section).
its very confusing but somehow i managed it and i have the network working.

i wish this ran amiga os!!


thanks again


keef