As a common practice, users are required to provide authentication information to log on to a Linux system. This helps in securing any sensitive or personal files, emails and other data residing on your system from any physical intrusion. However, if your system is placed at an already secure location, free from any privacy threat, you may avoid the hassle of providing your user credentials every time you log in. This article provides you with the following two ways to enable/disable automatic login to your Ubuntu system:
- Through the command line.
- Through the graphical interface.
Please note that we are running this tutorial on an Ubuntu 18.04 LTS (Bionic Beaver) system.
Enabling/Disabling Automatic Login through the Command Line
As a superuser, you can enable automatic login for yourself or for any other Ubuntu user by making some configuration changes in the custom.conf file as follows:
- Open the Terminal through Ubuntu Dash or by pressing Ctrl+Alt+T.
- Open the custom.conf file in the Nano editor through the following command:
Please note that you need to be a superuser in order to edit most of the system configurations.
When you enter your password, the following file will open:
In this file, the selected lines have been commented out. We can identify a commented-out line by the presence of a # character at the start of the line. The interpreter ignores the commented lines when reading through a configuration file. This means that in our file, the automatic login feature for user1 has been disabled.
Enable Automatic Login For a User
You can simply remove the # character from the last two lines we have selected and provide the username instead of the value “user1” for the user whose automatic login you want to enable.
For example:
In this tutorial, we have replaced the value user1 by sana. You can see the change in color of the now enabled feature.
Now save the file by pressing Ctrl+X and then Y.
Now when you restart the computer, the specified user will be logged in without being asked to provide any authentication details.
Disable Automatic Login For a User
In order to disable automatic login for a certain user, you can simply comment out(add a # character) the lines in the custom.conf lines where AutomaticLoginEnable=true and Automatic Login=[user1] has been specified.
You can see the change in color of the now disabled feature. Please save the file by pressing Ctrl+X and then Y. Now when you restart the computer, the specified user will be asked to provide authentication details for logging in. Pioneer.
Enabling/Disabling Automatic Login through the GUI
You can enable/disable automatic login for yourself or for any other Ubuntu user through the graphical interface as follows:
Click the downward arrow located on the top-right corner of your Ubuntu screen and then click your username. The following options will be displayed:
Select the Account Settings option.
The following Users dialog will open. Since you need to be a superuser to configure these settings, the Automatic Login button will be disabled by default. Click on the Unlock button located at the top-right side of the dialog to enable this button.
Provide authentication details through the following dialog and click Authenticate:
You can now switch the Automatic Login button to OFF or ON depending on whether you want to enable or disable a user’s automatic log in.
When you restart your computer, the login authentication procedure will depend on the choice you made here.
By following the simple steps described in this tutorial, you can enable/disable automatic login facility for yourself or for other users(as an administrator). This way you can set security access to your computer depending on your needs.
How to Enable/Disable Automatic Login in Ubuntu 18.04 LTS
Uninstall samba
To remove just samba package itself from Ubuntu 16.04 (Xenial Xerus) execute on terminal:
Uninstall samba and it's dependent packages
To remove the samba package and any other dependant package which are no longer needed from Ubuntu Xenial.
Purging samba
If you also want to delete configuration and/or data files of samba from Ubuntu Xenial then this will work:
To delete configuration and/or data files of samba and it's dependencies from Ubuntu Xenial then execute:
More information about apt-get remove
Advanced Package Tool, or APT, is a free software user interface that works with core libraries to handle the installation and removal of software on Debian, Ubuntu and other Linux distributions. APT simplifies the process of managing software on Unix-like computer systems by automating the retrieval, configuration and installation of software packages, either from precompiled files or by compiling source code.
apt-get is the command-line tool for handling packages, and may be considered the user's 'back-end' to other tools using the APT library.
apt-get remove is identical to install except that packages are removed instead of installed. Note that removing a package leaves its configuration files on the system. If a plus sign is appended to the package name (with no intervening space), the identified package will be installed instead of removed.
See Also
I was enabling file sharing using this question How to transfer files between Ubuntu and Windows?and something went wrong so I couldn't click on dialog buttons to install some service after samba. So samba got intalled and other service didn't so I couldn't complete all steps from tutorial and file sharing doesn't work.
So I want to uninstall samba and complete the tutorial again.
Community♦
DmitriyDmitriy
1 Answer
I think this is what you are after :)
Hope this helps.
BlakeBlake
Not the answer you're looking for? Browse other questions tagged 12.04samba or ask your own question.
How do I completely rip-out smb / samba from my Ubuntu 11.10 machine?
Install Samba Ubuntu
How do I, afterwards, reinstall it cleanly?
UPDATE: My goal is to rip out any functionality related to Windows SMB from my desktop and do a clean re-install of these components. See this question for some background.
Community♦
jldupontjldupont41622 gold badges55 silver badges1212 bronze badges
4 Answers
![Ubuntu Ubuntu](/uploads/1/2/3/7/123756051/425703973.jpg)
So, for the server, from the Terminal:
But, if you are having client problems, it would be more like:
Update:
Note that this answer only applies to Ubuntu 11.10! More recent Ubuntus will probably remove useful software with the
dpbdpbapt remove
command, so be sure to check what is being removed and if needed 'cherrypick' packages in synaptic
or similar.5,32411 gold badge2424 silver badges5050 bronze badges
A easier way to remove Samba that is simpler and cleaner.
sudo apt-get autoremove samba samba-common
This step uses the autoremove to remove the package.
sudo apt-get purge samba samba-common
This step cleans any configuration file you may have
cyeudoxuscyeudoxus
These solutions all relay on the system booting. But what do you do if your system is not booting because of samba?
If you are stuck in recovery mode, IE the rescue disk. apt-get does not always work, in fact it will get you a seg fault in a recovery shell, atleast on Ubuntu from what I've seen. To get around that, you can use
dpkg --purge --force-all samba
and also for common and winbind if the system still wont boot. Remember if you are in the recorvery mode shell, do not use sudo, because that will cause a seg fault. Just use the commands as you would if you were in as root.
But I have had Samba cause a system to stop booting, and this is how I was able to rip samba out, and then do a clean install after I got the system booting all the way up again. Once it's booted all the way up, go through and do the
sudo apt-get remove --purge samba samba-common
command to make sure everything has been removed. Unfortunately, you may also have to manually delete some items, because dpkg does not always delete startup scripts and other items the binary creates. This is what I've had to do, to thoroughly remove samba, when I couldn't get the system to boot. I hope this helps someone who was stuck in the same situation as me.
CaperneoignisCaperneoignis
![Samba Samba](/uploads/1/2/3/7/123756051/578237727.png)
I recently installed Ubuntu 17.04 under VirtualBox on a Windows 7 host and I needed to access files on the host. I'm fairly new to Linux so I thought I needed samba to access those shares. As mentioned above by dpb, I was having client problems. It turned out all I really needed to do was remove samba. Having Ubuntu 17.04 meant I had to re-install
cifs-utils
, not smbclient
in order to get client functionality back:After reboot, all my Windows network shares were accessible and client issues resolved.
wjandrea9,84844 gold badges2828 silver badges6767 bronze badges
wgenglandwgengland