Changes

From Amahi Wiki
Jump to: navigation, search
67 bytes removed ,  02:19, 1 February 2019
* If you havent ran this already
* Open a terminal (set the samba password for the root user. You need to remember this for later!):
{{Code|<pre>smbpasswd -a root
smbpasswd -e root
service smb restart
service nmb restart}}</pre>
* if your running Ubuntu 12.04 you will get a error saying smb: unrecogized service or nmb: unrecogized service, you can restart samba through the dashboard then Setup, then servers, click on Samba and click restart.
3. Back to windows!
4. Back to Amahi!
* Open a terminal
{{Code| sudo useradd -s /bin/false -d /dev/null ComputerNameNotedEarlier$ sudo smbpasswd -a -m ComputerNameNotedEarlier}}
* Remember the $ on the first line but not the second!
* This code authorizes your computer to connect
now your new smb.conf is beeing generated!
create the following file:
{{Code| nano /var/hda/domain-settings/netlogon/logon.bat}}
and add the following to it:
{{Text|Text=<pre>;Sync Windows clock with Samba clock
net time /set /yes
;Mount a samba share into x:
net use x: \\hda\SOFTWARE /persistent:no
net use y: \\hda\VIDEOS /persistent:no
net use z: \\hda\MUZIEK /persistent:no}}</pre>
save the file.
next go to the workstation that you want to add to the domain.
Select start, control panel, system, and click computernamecomputer name.
then select network-id and follow the wizard.
when it asks you for a username/password, supply the root username/password you created on the PDC.
Open a terminal on your hda, or, if you use putty, open a connection to your hda.<br>
Login as root:
{{Code| su -}}
First, backup your smb.conf file, in case you run into problems you can easily revert back.<br>
{{Code| cp /etc/samba/smb.conf /etc/samba/smb_old.conf}}
next we need to modify the smb file, i use nano for this, you may use any editor you feel confortable with
{{Code| nano /etc/samba/smb.conf}}
change the apropriate parts in the smb.conf.<br>
Save your smb.conf
So at this point we need to create the corresponding directories:
{{Code|<pre>mkdir /var/hda/domain-settings
mkdir /var/hda/domain-settings/netlogon
mkdir /var/hda/domain-settings/profiles}}</pre>
Each time you want a user to join the domain, a user needs to be added, this can be done through the users tab on the amahi dashboard.<br>
aditionally, a profile directory needs to be created.<br>
{{Code| mkdir /var/hda/domain-settings/profiles/JanJacobs}}
JanJacobs is the user i created through the users tab of the amahi dashboard.<br>
Since we are logging in as root, we need to change the ownership of the previously created directory to the corresponding owner:
{{Code| chown -R JanJacobs /var/hda/domain-settings/profiles/JanJacobs}}
Now, this still doesnt allow us to login, because in samba, machines need to be added too!<br>
this can be done automaticly, but for the time beeing we do it manually, amahi may facilitate this for you in the future.
{{Code| useradd -s /bin/false -d /dev/null computername$ smbpasswd -a -m computername}}Now as you can see there are some differences, when we added the Windows pc to Linux, we added the name computernamecomputer name$,
this tells Linux that it is a machine, not a name.<br>
Next when we added the Samba password, we invoked the -m,
now its time to restart samba.
{{Code| /etc/init.d/smb restart}}
Now you need to setup your Windows pc for domain logins.<br>
(Note the first time that you join a Samba domain from Windows, you will need to join the domain by using root as the name, and your root password for the password.<br>
After rebooting, any valid user will be able to access the domain.)
12,424

edits