LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-11-2009, 09:47 AM   #31
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158

Original Poster
Blog Entries: 1

Rep: Reputation: 30

I've rebooted the server, and still can't login as david

So, I've done
Code:
root@RCH-SERVER:/home# userdel david
root@RCH-SERVER:/home# useradd -d /home/david -p password -s /bin/bash -g users -G admin david
& I still can't login as david

Code:
login as: david
david@192.168.2.5's password:
Access denied
So, I'm going to delete the user, reboot the server, add the user, & see what happens there. Am I missing something here?

Last edited by DarkFlame; 01-11-2009 at 09:53 AM.
 
Old 01-11-2009, 09:58 AM   #32
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158

Original Poster
Blog Entries: 1

Rep: Reputation: 30
I have been entering the password as one of the parameters in the useradd command. It has apparently failed, thus preventing user "david" from logging in. I tried the passwd command, entered the password, and am now able to login, and it shows "david" as a response to the users command.

Another baby step taken!
 
Old 01-11-2009, 02:00 PM   #33
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Next step is to make sure linux user david can read and write to the directory you plan to share.

Try

cd /path/to/data
touch test_file
ls
rm testfile

as david.
 
Old 01-11-2009, 03:00 PM   #34
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158

Original Poster
Blog Entries: 1

Rep: Reputation: 30
Quote:
Originally Posted by billymayday View Post
Next step is to make sure linux user david can read and write to the directory you plan to share.

Try

cd /path/to/data
touch test_file
ls
rm testfile

as david.
Bill, THANK YOU, that has worked. david apparently has read/write access on the share!

However, I did it again! I'm learning the really hard way! I figured that I'd need to reinstall Samba, so I did an uninstall & a re-install, and it still was failing. SO, I did an uninstall & I deleted everything in the /etc/samba folder - EVERYTHING, then I deleted the folder & tried to reinstall Samba. That failed. I guess I'd managed to completely hose up the installation...Soooo, I connected the OpenSuSE drive, wiped it out completely and installed Ubunto onto IT. Then, when I was trying to boot it up, it gave me "Grub 1.5 Boot Error 17" and it locked up. It did this 3 times. So, I found the SuperGrubDisk website and downloaded the .iso file, burned it to CD, booted up to it, repaired the drive, and now Ubuntu is up & running on THAT drive, with Samba installed. I have managed to create the Linux user david, but not the Samba user - that's the next step. Stand-by for DETAILS!
 
Old 01-11-2009, 03:03 PM   #35
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158

Original Poster
Blog Entries: 1

Rep: Reputation: 30
Ok, I've created Linux user april and she is able to touch & rm in the data folders. That's a good sign.

Now to try and create the Samba users...
 
Old 01-11-2009, 04:22 PM   #36
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
David,

when you get a chance, can you show "fdisk -l" and "mount" and give a really brief explanation of which partition is RAID?
 
Old 01-11-2009, 04:43 PM   #37
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158

Original Poster
Blog Entries: 1

Rep: Reputation: 30
Brief? Me? Fat chance of that! I'll do my best ...

But, first, a quick update. I have gotten access to the data for both users april & david. I'm going back & looking at my notes for the parameters that give RW access to each for stuff created by the other user. That would be something like this ...

From the command line:
Code:
chmod g+s `directory_name'
Then, add to the share section of smb.conf:
Code:
force create mode = 0660 
force directory mode = 0770
And, here is my share section:

Code:
[DATA]
        comment = Network Data
        path = /NW-DATA/DATA
        browseable = yes
        read only = no
        guest ok = yes
        force create mode = 0660
        force directory mode = 0770
& I've mapped the shared folder to the J: drive on my computer, and set My Documents to point at it. I'm getting REAL close!

Here are the two printouts:

Code:
root@RCH-SERVER:/NW-DATA/DATA# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x41413535

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       30401   244196001   fd  Linux raid autodetect

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0002d3a2

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       30401   244196001   fd  Linux raid autodetect

Disk /dev/sdc: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00010f8f

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       30401   244196001   fd  Linux raid autodetect

Disk /dev/sdd: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00055741

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1        9327    74919096   83  Linux
/dev/sdd2            9328        9729     3229065    5  Extended
/dev/sdd5            9328        9729     3229033+  82  Linux swap / Solaris

Disk /dev/sde: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000b3fcd

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1       30401   244196001   fd  Linux raid autodetect
Above, sda, sdb, sdc, & sde are the RAID5 array.

Code:
root@RCH-SERVER:/NW-DATA/DATA# mount
/dev/sdd1 on / type ext3 (rw,relatime,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,nosuid,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/md0 on /NW-DATA type ext3 (rw)
securityfs on /sys/kernel/security type securityfs (rw)
root@RCH-SERVER:/NW-DATA/DATA#
Above, /dev/md0 on /NW-DATA type ext3 (rw) is the RAID5 array. Everything on the array is in the /NW-DATA/DATA folder
 
Old 01-11-2009, 04:54 PM   #38
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
OK, so if I were you, I'd create a test share on / (ie sdd1) and make sure that works to rule out any raid issues.

I'm out for an hour or two.

BM
 
Old 01-11-2009, 05:13 PM   #39
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158

Original Poster
Blog Entries: 1

Rep: Reputation: 30
And now both users (april & david) have full rw access to the data from WinXP Pro!

Now, I'm going to do it again on one of the other drives (without deleting the one I've got working - silly me!). When I can get it working twice with no problems, I'll have good documentation of what I need to do.

THEN I'll move the shared printer from my XP box to the server!

And, THEN I'll be able to swap the OS HDDs (not swapping between OpenSuSE & Ubuntu, but between two identical installations of Ubuntu) - & I'll be able to tell if I need to go back through and remount the RAID5 array and re-create users and permissions, etc.
 
Old 01-11-2009, 06:25 PM   #40
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
DAvid, I think your "chmod g+s" should be "chmod g+r,g+w". I'd make share directories 775 or 770
 
Old 01-11-2009, 09:36 PM   #41
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158

Original Poster
Blog Entries: 1

Rep: Reputation: 30
Bill,

No doubt that I need to look further into the chmod command - especially since I don't have a clue about the differences between g+s and g+r,g+w. I definitely need to look into that.

Today has been quite a productive day, especially with your help. I can't believe how much time I'd spent struggling with this when it was as simple as not having the user successfully defined. That just supports my theory that "The difficulty of finding a solution is inversely proportionate to the simplicity of the problem and/or the simplicity of the actual solution."

But, it has been more productive - with this server - than I've experienced since I started working on it. Today, I have managed to get Ubuntu up & running as a file server (print server is next, but this was the big hump for me). It took me several builds to make that happen, and each one provided more in-depth documentation for me to be able to do it smoothly. Once we finally got me over the hump, I knew I had it figured out. So, I connected another HDD and did a completely fresh and clean install, from the ground up, all the way to having it completely functional (as a file server, not printing from it yet). I continued tweaking the documentation I've been creating. It is that documentation that has enabled me to do the subsequent installs with absolute consistency and achieve the desired results. When I had that one working, I went back to the other HDD & wiped it out and did another completely fresh installation. Those last two installations took only about 90 minutes each, from first turning on the machine to having it completely functional and accessible from my XP Pro boxes. Finally, I had two separate HDDs with Ubuntu Server 8.10 built exactly alike. Then, I did an experiment. I shut down the server and switched the SATA cable from the last OS HDD to boot up to connect the other one & booted it up. It came right up just like it had been working the whole time. I didn't have to remount anything, I didn't have to tweak any settings in smb.conf, and I especially didn't have to mess with any differences between OpenSuSE & Ubuntu! I didn't have to do anything except power down, swap a cable, & power back up. Wah-lah! It's done.

So, now I'm a happy camper. I can start working on some other projects - like cleaning off my desk and spending a little more time teaching our 7 yr old daughter how to play the guitar! But, I can now also start thinking to the future and considering how I'm going to go about structuring my backup routines - I'm going to get a bigger HDD and I need to decide if I'm going to connect it directly to the server externally as an e-sata in it's own enclosure and back it up from there, or if I'm going to install it in my own desktop and back it up from there. And, I can start thinking about connecting the printer to it and utilizing the print server. Maybe getting an uninterruptible power supply so that it'll be even better protected. And, I'm sure there are other issues to address. Doing backups will be my first order of business, as I'll then feel a lot better about this 180gb HDD that's in my box and making noises that I don't like to hear coming from HDDs. Fortunately, it's just got a 2nd copy of some of the data & isn't my primary OS HDD. So, it's been a VERY good Sunday. I knew that I could make it work - with patience and the right help. And, it was your help, Bill, that got me over the hump. THANK YOU VERY MUCH!!!

By the way, I've uploaded to a folder on one of my websites some stuff that is important to this process. There's my fstab file, smb.conf file, and the word document I've created for Ubuntu Server 8.10 Disaster Recovery. You can look at them in this folder.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
samba on fc9, how to limit access to users joemarceo Linux - Newbie 2 10-08-2008 02:20 AM
Samba Users and groups with different access? logonuser Linux - Server 2 09-07-2008 07:38 AM
Samba filesharing-rights Clowncar Linux - Networking 7 09-27-2006 10:16 AM
Samba.. NT domain users access denied.. however.. StamfordRob Slackware 3 03-24-2005 04:38 PM
Samba access by Windows users locking out directory access with Konqueror harry_fine SUSE / openSUSE 1 12-18-2004 05:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration