<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: How to Manage Samba4 AD Infrastructure from Linux Command Line &#8211; Part 2	</title>
	<atom:link href="https://www.tecmint.com/manage-samba4-active-directory-linux-command-line/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.tecmint.com/manage-samba4-active-directory-linux-command-line/</link>
	<description>Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks.</description>
	<lastBuildDate>Sat, 27 Jul 2024 07:14:24 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Sysadmin		</title>
		<link>https://www.tecmint.com/manage-samba4-active-directory-linux-command-line/comment-page-1/#comment-2195156</link>

		<dc:creator><![CDATA[Sysadmin]]></dc:creator>
		<pubDate>Sat, 27 Jul 2024 07:14:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=23482#comment-2195156</guid>

					<description><![CDATA[I can also recommend a GUI tool called the Active Directory Management Center (ADMC) that simplifies configuration of User and Computers and Group Policy Manager policies.]]></description>
			<content:encoded><![CDATA[<p>I can also recommend a GUI tool called the Active Directory Management Center (ADMC) that simplifies configuration of User and Computers and Group Policy Manager policies.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Christopher Narvaez Hernandez		</title>
		<link>https://www.tecmint.com/manage-samba4-active-directory-linux-command-line/comment-page-1/#comment-1334823</link>

		<dc:creator><![CDATA[Christopher Narvaez Hernandez]]></dc:creator>
		<pubDate>Sat, 23 May 2020 02:54:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=23482#comment-1334823</guid>

					<description><![CDATA[Hello All, 

Anyone knows, why when I´m trying to create a new user, I get &lt;strong&gt;/bin/false&lt;/strong&gt; on the login shell, I already try to modify it, and I can´t log in on the Linux host.
&lt;pre&gt;
root@svuadc2lux:~# getent passwd
&lt;/pre&gt;
LUXSOLUCIONES\administrator:*:0:100::/home/LUXSOLUCIONES/administrator:/bin/false
LUXSOLUCIONES\cnarvaezhz:*:3000016:100::/home/LUXSOLUCIONES/cnarvaezhz:/bin/false
LUXSOLUCIONES\luxadmin:*:3000044:100::/home/LUXSOLUCIONES/luxadmin:/bin/false

I use this command to add another new user, and get the same result:
&lt;code&gt;
root@svuadc2lux:~# samba-tool user add luxadmin --given-name=&quot;System&quot; --surname=&quot;Administrator&quot; --login-shell=/bin/bash
&lt;/code&gt;
when i check the samba DB i get this:
&lt;pre&gt;
root@svuadc2lux:~# ldbsearch  -H /var/lib/samba/private/sam.ldb &#039;CN=cnarvaezhz&#039;
&lt;/pre&gt;
&lt;h5&gt;Sample Output&lt;/h5&gt;
&lt;pre&gt;
# record 1
dn: CN=cnarvaezhz,CN=Users,DC=luxsoluciones,DC=lan
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: cnarvaezhz
instanceType: 4
whenCreated: 20200523012953.0Z
uSNCreated: 54859
name: cnarvaezhz
objectGUID: 10b56ed4-7c3b-45f5-bbd9-856585ee8161
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 0
lastLogoff: 0
lastLogon: 0
primaryGroupID: 513
objectSid: S-1-5-21-270612473-4248026028-3571129099-1103
accountExpires: 9223372036854775807
logonCount: 0
sAMAccountName: cnarvaezhz
sAMAccountType: 805306368
userPrincipalName: cnarvaezhz@luxsoluciones.lan
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=luxsoluciones,DC=lan
pwdLastSet: 132346709931666750
userAccountControl: 512
memberOf: CN=Administrators,CN=Builtin,DC=luxsoluciones,DC=lan
loginShell: /bin/bash
whenChanged: 20200523021541.0Z
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>Hello All, </p>
<p>Anyone knows, why when I´m trying to create a new user, I get <strong>/bin/false</strong> on the login shell, I already try to modify it, and I can´t log in on the Linux host.</p>
<pre>
root@svuadc2lux:~# getent passwd
</pre>
<p>LUXSOLUCIONES\administrator:*:0:100::/home/LUXSOLUCIONES/administrator:/bin/false<br />
LUXSOLUCIONES\cnarvaezhz:*:3000016:100::/home/LUXSOLUCIONES/cnarvaezhz:/bin/false<br />
LUXSOLUCIONES\luxadmin:*:3000044:100::/home/LUXSOLUCIONES/luxadmin:/bin/false</p>
<p>I use this command to add another new user, and get the same result:<br />
<code><br />
root@svuadc2lux:~# samba-tool user add luxadmin --given-name="System" --surname="Administrator" --login-shell=/bin/bash<br />
</code><br />
when i check the samba DB i get this:</p>
<pre>
root@svuadc2lux:~# ldbsearch  -H /var/lib/samba/private/sam.ldb 'CN=cnarvaezhz'
</pre>
<h5>Sample Output</h5>
<pre>
# record 1
dn: CN=cnarvaezhz,CN=Users,DC=luxsoluciones,DC=lan
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: cnarvaezhz
instanceType: 4
whenCreated: 20200523012953.0Z
uSNCreated: 54859
name: cnarvaezhz
objectGUID: 10b56ed4-7c3b-45f5-bbd9-856585ee8161
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 0
lastLogoff: 0
lastLogon: 0
primaryGroupID: 513
objectSid: S-1-5-21-270612473-4248026028-3571129099-1103
accountExpires: 9223372036854775807
logonCount: 0
sAMAccountName: cnarvaezhz
sAMAccountType: 805306368
userPrincipalName: cnarvaezhz@luxsoluciones.lan
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=luxsoluciones,DC=lan
pwdLastSet: 132346709931666750
userAccountControl: 512
memberOf: CN=Administrators,CN=Builtin,DC=luxsoluciones,DC=lan
loginShell: /bin/bash
whenChanged: 20200523021541.0Z
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Samuel Åslund		</title>
		<link>https://www.tecmint.com/manage-samba4-active-directory-linux-command-line/comment-page-1/#comment-1319090</link>

		<dc:creator><![CDATA[Samuel Åslund]]></dc:creator>
		<pubDate>Fri, 28 Feb 2020 12:02:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=23482#comment-1319090</guid>

					<description><![CDATA[You really should add more warnings for editing the sudoers file.

If it breaks &lt;strong&gt;sudo&lt;/strong&gt; stops working, which probably means that it is non-trivial to fix the problem.

Basically you should always keep the file you are editing open, save it without closing it and try to log in from another terminal and check that sudo access still works before closing the file.

It&#039;s very easy to introduce a syntax error somewhere and suddenly not have any root access, with today&#039;s systems often running without access to a root-password you will have to boot into the single-user mode or a rescue-disk to solve the problem.]]></description>
			<content:encoded><![CDATA[<p>You really should add more warnings for editing the sudoers file.</p>
<p>If it breaks <strong>sudo</strong> stops working, which probably means that it is non-trivial to fix the problem.</p>
<p>Basically you should always keep the file you are editing open, save it without closing it and try to log in from another terminal and check that sudo access still works before closing the file.</p>
<p>It&#8217;s very easy to introduce a syntax error somewhere and suddenly not have any root access, with today&#8217;s systems often running without access to a root-password you will have to boot into the single-user mode or a rescue-disk to solve the problem.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Lucas L9		</title>
		<link>https://www.tecmint.com/manage-samba4-active-directory-linux-command-line/comment-page-1/#comment-1292654</link>

		<dc:creator><![CDATA[Lucas L9]]></dc:creator>
		<pubDate>Tue, 19 Nov 2019 14:14:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=23482#comment-1292654</guid>

					<description><![CDATA[If you get this error: no directory logging in with &lt;code&gt;home=/&lt;/code&gt;. 

You can also modify &lt;strong&gt;/etc/pam.d/common-session&lt;/strong&gt; to make it so that a user&#039;s home directory will be created on the first login. 

Add the following line to that file.

&lt;code&gt;session required pam_mkhomedir.so&lt;/code&gt;

This is particularly useful if your system is on a network where the users are managed externally to your machine, by LDAP for instance.]]></description>
			<content:encoded><![CDATA[<p>If you get this error: no directory logging in with <code>home=/</code>. </p>
<p>You can also modify <strong>/etc/pam.d/common-session</strong> to make it so that a user&#8217;s home directory will be created on the first login. </p>
<p>Add the following line to that file.</p>
<p><code>session required pam_mkhomedir.so</code></p>
<p>This is particularly useful if your system is on a network where the users are managed externally to your machine, by LDAP for instance.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Lucas L9		</title>
		<link>https://www.tecmint.com/manage-samba4-active-directory-linux-command-line/comment-page-1/#comment-1292647</link>

		<dc:creator><![CDATA[Lucas L9]]></dc:creator>
		<pubDate>Tue, 19 Nov 2019 13:51:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=23482#comment-1292647</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/manage-samba4-active-directory-linux-command-line/comment-page-1/#comment-1292284&quot;&gt;Lucas L9&lt;/a&gt;.

Found my error:

Check &lt;strong&gt;/etc/nsswitch.conf&lt;/strong&gt;:
&lt;pre&gt;
passwd: files winbind
group:  files winbind
hosts:   files dns
networks: files dns
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/manage-samba4-active-directory-linux-command-line/comment-page-1/#comment-1292284">Lucas L9</a>.</p>
<p>Found my error:</p>
<p>Check <strong>/etc/nsswitch.conf</strong>:</p>
<pre>
passwd: files winbind
group:  files winbind
hosts:   files dns
networks: files dns
</pre>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
