PDA

View Full Version : [ubuntu] Linux help peoples, samba, sharing etc



mjollnir79
April 4th, 2011, 09:36 PM
ok I missed a couple class sessions in linux so I am a bit lost, so I need help with a few things, I got the homework here, the instuctor has posted the answers so I'm not looking to cheat but any info on how to get there with some of this would be awesome! And appreciated, I have over 100% in that class so far, but we have a test tomorrow and with my crazy work schedule, I am a bit concerned now... 1. (5 points) Create a windows share for the /shared folder on your desktop station. Show the configuration file changes needed to the /etc/samba/smb.conf file necessary to create that share. [shared] comment = Public Shared Files path = /shared read only = No create mask = 0777 directory mask = 0777 guest ok = Yes 2. (5 points) Load a Windows XP virtual machine from the ISO file on the instructor's “shared” share. Verify that connection to your local “shared” share works from that machine as well. root@happyuser-G25:~# cat /shared/shared01.txt New connections will be remembered. Status Local Remote Network ------------------------------------------------------------------------------- OK G: \\10.215.100.101\shared Microsoft Windows Network The command completed successfully. 3. (5 points) Create another directory /private and a share called “private” that is only accessible to a unique user that you create on your own machine. Create a Windows XP user, and a Linux user with smb password that can access that share. Show the configuration file changes needed to the /etc/samba/smb.conf file necessary to create that share, including the directives that specify a unique user being able to connect. Also show the Linux ownership and directory permissions on the /private directory you have created. root@happyuser-G25:~# adduser private Adding user `private' ... Adding new group `private' (1022) ... Adding new user `private' (1016) with group `private' ... Creating home directory `/home/private' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for private Enter the new value, or press ENTER for the default Full Name []: private user Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] y root@happyuser-G25:~# mkdir /private root@happyuser-G25:~# chown private /private root@happyuser-G25:~# chmod 700 /private/ root@happyuser-G25:~# ls /private -lad drwx------ 2 private root 4096 2010-10-13 19:37 /private root@happyuser-G25:~# smbpasswd -a private New SMB password: Retype new SMB password: Added user private. Created private user on XP box, and logged in as that user. Mapped network drive root@happyuser-G25:~# cat /private/private.txt New connections will be remembered. Status Local Remote Network ------------------------------------------------------------------------------- OK F: \\10.215.100.101\private Microsoft Windows Network OK G: \\10.215.100.101\shared Microsoft Windows Network The command completed successfully. [private] comment = Private Files for User Only path = /private valid users = private read only = No 4. (5 points) Create a Linux group called “mygroup” and add your unique user and your happyuser to that group. Create a share /mygroup and share it as “mygroup”. Show the configuration file changes needed to the /etc/samba/smb.conf file necessary to create that share. Also show the Linux ownership and directory permissions on the /mygroup directory you have created. root@happyuser-G25:~# addgroup mygroup Adding group `mygroup' (GID 1023) ... Done. root@happyuser-G25:~# adduser happyuser mygroup Adding user `happyuser' to group `mygroup' ... Adding user happyuser to group mygroup Done. root@happyuser-G25:~# adduser private mygroup Adding user `private' to group `mygroup' ... Adding user private to group mygroup Done. root@happyuser-G25:~# mkdir /mygroup root@happyuser-G25:~# chown private:mygroup /mygroup root@happyuser-G25:~# chmod 770 /mygroup root@happyuser-G25:~# ls -lad /mygroup/ drwxrwx--- 2 private mygroup 4096 2010-10-13 20:13 /mygroup/ root@happyuser-G25:~# cat /mygroup/mygroup.txt New connections will be remembered. Status Local Remote Network ------------------------------------------------------------------------------- OK F: \\10.215.100.101\private Microsoft Windows Network OK G: \\10.215.100.101\shared Microsoft Windows Network OK H: \\10.215.100.101\mygroup Microsoft Windows Network The command completed successfully. root@happyuser-G25:~# ls -la /mygroup/ total 12 drwxrwx--- 2 private mygroup 4096 2010-10-13 20:26 . drwxr-xr-x 27 root root 4096 2010-10-13 20:13 .. -rwxrw---- 1 private private 373 2010-10-13 20:26 mygroup.txt [mygroup] comment = Files for mygroup only path = /mygroup valid users = @mygroup read only = No 5. (5 points) Create a share on the Windows XP virtual machine and connect to it with smbclient. Show a connection log and transfer a file to and from the Windows and Linux machine to verify operation. happyuser@happyuser-G25:~$ smbclient //10.215.100.141/Documents Enter happyuser's password: Domain=[HAPPY-6842F26C5] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] smb: \> put test.txt putting file test.txt as \test.txt (4.2 kb/s) (average 4.2 kb/s) smb: \> dir . DR 0 Wed Oct 13 20:35:31 2010 .. DR 0 Wed Oct 13 20:35:31 2010 desktop.ini AHS 62 Tue Oct 12 07:36:04 2010 My Music DR 0 Tue Oct 12 12:50:21 2010 My Pictures DR 0 Tue Oct 12 12:50:13 2010 My Videos DR 0 Tue Oct 12 12:49:32 2010 test.txt A 13 Wed Oct 13 20:35:31 2010 40954 blocks of size 2097152. 39336 blocks available smb: \> get test2.txt getting file \test2.txt of size 13 as test2.txt (6.3 KiloBytes/sec) (average 6.3 KiloBytes/sec) smb: \> exit happyuser@happyuser-G25:~$ ok with all this, it appears there is a generated text file needed, I can make that shares on a virtual XP machine, no problem, that's easy, but this text file, I don't have? How is it generated? ok on to email... 1) (5 points) Configure your mail server such that it can successfully receive mail from external machines. What did you have to do? Install postfix mail server if it isn't already installed. Test connection with telnet to server's IP on port 25. 2) (5 points) Set up a test account named emailuser. . Send an email to your local machine from an external machine with telnet. What did you have to type? [happyuser@HTC-Fed13 ~]$ telnet 10.215.100.142 25 Trying 10.215.100.142... Connected to 10.215.100.142. Escape character is '^]'. 220 HTC-Linux-X.htc.bogus ESMTP Postfix (Ubuntu) EHLO Fed13.htc.bogus 250-HTC-Linux-X.htc.bogus 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN MAIL FROM: jwalters@htc.bogus 250 2.1.0 Ok RCPT TO: emailuser@htc.bogus 250 2.1.5 Ok DATA 354 End data with . Subject: Mail Test 1 Testing 123 . 250 2.0.0 Ok: queued as 44BAF1402224 quit 221 2.0.0 Bye Connection closed by foreign host. 3) (5 points) Check your email on your local machine for your default user. Send an email to your test user. What did you have to do? If you have not switched postfix to deliver to Maildir locations, you can use the mail command from the "mailutils" package. If you have made that switch, you can use a GUI client like Thunderbird or a webmail client like Squirrelmail. 4) (5 points) Check your email on your local machine for your email test user. Reply to your email from your default user. What did you have to do? If you have not switched postfix to deliver to Maildir locations, you can use the mail command from the "mailutils" package. If you have made that switch, you can use a GUI client like Thunderbird or a webmail client like Squirrelmail. 5) (5 points) Configure your mail server so that it is listening for only pop3s and imaps traffic. Get instructor sign-off. This was another bonus question, since we didn't do that in class. thanks for any help guys, I really wanna learn this stuff! I plan to go for the Linux certs after graduation!

mjollnir79
April 4th, 2011, 09:37 PM
Ok formating didn't turn out so well, LOL Heres the same thread unanswered but readable on the techexam forums http://www.techexams.net/forums/off-topic/64745-linux-help.html

dmizer
April 5th, 2011, 01:57 AM
Please do not post homework questions here. Thank you.