WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Samba and default user in tinycore  (Read 20196 times)

Offline dsara35

  • Newbie
  • *
  • Posts: 49
Samba and default user in tinycore
« on: May 10, 2010, 05:29:01 AM »
Hi im going to user tinycore terminal server for lan boot. in both server and client i install samba3.tcz. i want to start samba while booting i command /usr/local/etc/init.d/samba start in bootlocal but it not working. one system im going to set as server it boot the client now using smbmount the specified dir is boot in client(lan boot) if the files that r in dir if change r edit by the user want to save directly to server using samba. help me to do this ,,,,,,,,, next i create one user in tinycore instead of tc i save passwd,gshadow,shadow,group after create image and boot it by secure login,i start samba to the created user it add the user in data base no error but i can view that in windows system i try to open that it showing error access denied no permission,,,,,, i dont know how to solve this  ??? [saving smilies]
« Last Edit: May 10, 2010, 02:31:42 PM by ^thehatsrule^ »
D.Saravanan

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Samba and default user in tinycore
« Reply #1 on: May 10, 2010, 05:47:49 AM »
Did you create the user in both linux and samba?

Offline dsara35

  • Newbie
  • *
  • Posts: 49
Re: Samba and default user in tinycore
« Reply #2 on: May 10, 2010, 06:27:14 AM »
Ya in both abc in linux and for samba smbpasswd -a abc like this i add the user ..
D.Saravanan

Offline r0nin101011

  • Newbie
  • *
  • Posts: 2
Re: Samba and default user in tinycore
« Reply #3 on: May 10, 2010, 02:40:53 PM »
Did you to enable the user? 'smbpasswd -e username'

Not sure its required anymore, but whenever I add a user for samba I enable also.

Offline combo3

  • Full Member
  • ***
  • Posts: 148
Re: Samba and default user in tinycore
« Reply #4 on: May 10, 2010, 03:59:45 PM »
On SMB Server:

Windows clients require the following lines in smb.conf to authenticate:

Code: [Select]
## Global Settings
[global]

workgroup = workgroup
netbios name = myserver

hosts allow = 192.168. 127.0.0.1
security = user

local master = no

## Passwords & Authentication

encrypt passwords = yes

Offline dsara35

  • Newbie
  • *
  • Posts: 49
Re: Samba and default user in tinycore
« Reply #5 on: May 11, 2010, 01:14:10 AM »
I will try , Any one explain me how to start samba while booting and while client booting i want do smbmount for linux client.....
D.Saravanan

Offline combo3

  • Full Member
  • ***
  • Posts: 148
Re: Samba and default user in tinycore
« Reply #6 on: May 11, 2010, 03:38:16 PM »
Server

To start samba on the server during boot save your settings:

1) Open a terminal and enter the following:

Code: [Select]
echo usr/local/etc/samba >> /opt/.filetool.lst

echo "/usr/local/etc/init.d/samba start" >> /opt/bootlocal.sh

2) Open Control Panel
3) Select Backup/Restore
3) Enter your backup device in the dialog box
4) Click on Backup

For more info on Backup/Restore see:
Core Concepts and the articles under "Persistence" in the Wiki

Linux Client

To mount the share on the linux client requires:

filesystems-2.6.29.1-tinycore.tcz
Samba3.tcz (optional - see step #2 below for details)

1) Open a terminal and create a mount point. Example:

Code: [Select]
sudo mkdir /mnt/myshare
or in your home directory

Code: [Select]
mkdir -p mnt/myshare

Note: If you create a mount point elsewhere in your home directory (i.e. not in ~/mnt) then remember to add it to /opt/.xfiletool.lst so you don't accidentally backup up your entire server when you run a backup. (home/tc/mnt is already included in .xfiletool.lst) {Thanks Kindomcome}

Code: [Select]
echo home/tc/myshare >> /opt/.xfiletool.lst
2) Invoke the mount command.

Mount syntax (without Samba3):

sudo mount -t cifs //ip.add.re.ss/share /mount/point -o username=xxx,password=yyy


Mount Syntax (requires Samba3.tcz):

sudo mount.cifs {service} {mount-point} [-ooptions]

Example 1 - sudo mount.cifs  //192.168.0.10/share /mnt/myshare -o user=your_username
Example 2 - sudo mount.cifs  \\\\server_name\\share /mnt/myshare -o user=your_username
Example 3 - sudo mount -t cifs //192.168.0.10/share /mnt/myshare  -o user=your_username

To automate the process at boot, you could add the following lines to /opt/bootlocal.sh and do a backup.

Code: [Select]
echo "mkdir /mnt/myshare >> /opt/bootlocal.sh

echo "mount -t cifs  //192.168.0.10/share /mnt/myshare -o user=xxx, password=yyy" >> /opt/bootlocal.sh

NOTE: This is not very secure. A better option is to create a script with the above commands and run it after booting:

Code: [Select]
#!/bin/sh
sudo mkdir /mnt/myshare
sudo mount.cifs  //192.168.0.10/share /mnt/myshare -o user=your_username

For netboot instructions see Netbooting.


{Edited to incorporate corrections from Kingdomcome}
« Last Edit: May 12, 2010, 01:49:41 AM by combo3 »

Offline Kingdomcome

  • Sr. Member
  • ****
  • Posts: 286
Re: Samba and default user in tinycore
« Reply #7 on: May 11, 2010, 08:16:01 PM »
To mount the share on the linux client requires:
filesystems-2.6.29.1-tinycore.tcz
Samba3.tcz

1) Open a terminal and create a mount point. Example:
Code: [Select]
sudo mkdir /mnt/myshare
or in your home directory
Code: [Select]
mkdir myshare

Note: If you create the mount point in your home directory remember to add it to /opt/.xfiletool.lst so you don't accidentally backup up your entire server when you do a backup.
Code: [Select]
echo home/tc/myshare >> /opt/.xfiletool.lst

FYI:
1)  samba3.tcz is not required on the client, only filesystems-2.6.29.1-tinycore.tcz.  You will need to use the "mount -t cifs" syntax if samba3.tcz is not installed
Code: [Select]
sudo mount -t cifs //ip.add.re.ss/share /mount/point -o username=xxx,password=yyy
2) "/home/tc/mnt" is already in the default /opt/.xfiletool.lst so that is the dir that I create my mount points to avoid having the shared data backed up.

Offline dsara35

  • Newbie
  • *
  • Posts: 49
Re: Samba and default user in tinycore
« Reply #8 on: May 12, 2010, 01:37:32 AM »
Thanks for reply... Im not using tinycore server in gui mode im using in prompt mode so if i want to backupand restore the data i want to give

 filetool.sh {backup r restore}

Its working but my questions is the backup can done automatically during shutdown r reboot and restore have been perform during booting,,,,,,,,,,,,,, so there any way to do this automatically without each and everytime as filetool.sh {backup restore}.
D.Saravanan

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Samba and default user in tinycore
« Reply #9 on: May 12, 2010, 01:41:14 AM »
After backup/restore is set up once, it should work automatically on every shutdown/boot thereafter.

Offline dsara35

  • Newbie
  • *
  • Posts: 49
Re: Samba and default user in tinycore
« Reply #10 on: May 12, 2010, 01:58:46 AM »
Sorry im not clear by ur reply.. My problem is i add the dir name as home/123 in .filetool.lst, and set backupdevice as sdb1/ to my pendrive.. before i reboot the system i enter in terminal filetool.sh backup it backup the dir. after i reboor the system i enter filetool.sh restore in terminal the data as restore.
 As u said it not perform automatically..
D.Saravanan

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Samba and default user in tinycore
« Reply #11 on: May 12, 2010, 02:06:35 AM »
If you have the boot code "restore=sdb1", the backup should be restored automatically on boot.

Offline dsara35

  • Newbie
  • *
  • Posts: 49
Re: Samba and default user in tinycore
« Reply #12 on: May 12, 2010, 02:08:41 AM »
Im using Lanboot for more than 20 clients. so i add all the user in passwd,group,shadow,gshadow file and create teh image all the user working well.. But the my problem is im using sambaserver in tinycore(Server) so for the each user i want to start the samba server and set the mount.cifs for the each and every user.

 My client is in gui mode... Its autologin to root ,if i set noautologin it ask for login i enter the user name and password but it enter into prompt mode not to gui. I command i enter startx the xvesa window is opening y this happening i dont know.

 The single image only going to share to all clients so the want to enter into the username directly so i can perform the user to share the mount point in the server..
 
Please help me in this to..;.
D.Saravanan

Offline dsara35

  • Newbie
  • *
  • Posts: 49
Re: Samba and default user in tinycore
« Reply #13 on: May 12, 2010, 02:24:27 AM »
I enter the boot code as restore=sdb1 it not working,,,,,, it showing error as invalid device....
D.Saravanan

Offline dsara35

  • Newbie
  • *
  • Posts: 49
Re: Samba and default user in tinycore
« Reply #14 on: May 12, 2010, 02:47:31 AM »
Now in server im having more than five user as i want to share the five directory to five clients.. so i want start samba server for the five user by smbpasswd -a username after boot.. so i can able to backup smbpasswd r code to do that in booting ??????????
D.Saravanan