LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 06-29-2015, 02:55 PM   #1
bignickel
LQ Newbie
 
Registered: Jun 2015
Posts: 7

Rep: Reputation: Disabled
Folders missing from /root after 14.1 install


Good day, newbie here.

My good friend helped me (read: installed for me) 14.1 Slackware on a spare 2012 Toshiba laptop I had laying around. Installation seemed to work just fine.

However, while he was answering some of my questions, we discovered: there are folders missing in /root: there's no desktop folder, etc.

The only folders we see are : .config, .dbus, and .gnupg. The only files are .bash_history, .xinitrc, and .xsession

Any ideas? Do we need to add more files manually? Does it matter?
 
Old 06-29-2015, 03:24 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Hi and welcome to this forum.

The content of /root as you see it is normal and there's no need to add files there: "root" being the "superuser" or the "admin" is not supposed to own many files, especially not those intended for the desktop as you are supposed to use it as a regular user, not as root. you files will go in /home/<your regular user name>, for instance /home/bignickel

So if not already done please use the command "adduser" to add an account for regular user. bignickel is an acceptable name for that user but you may choose another one if you prefer

You can accept the default proposed settings when asked, do add the additional groups as suggested by the program to be able to fully use your desktop.

This is explained in : Configure your new Slackware System that I advise you to read first.

Last edited by Didier Spaier; 06-29-2015 at 03:26 PM.
 
Old 06-29-2015, 03:33 PM   #3
bignickel
LQ Newbie
 
Registered: Jun 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks for your quick reply. Yes, we've already created 'bignickel', and I'm in as that now creating these posts.

I will read the link you sent; it seems that your opinion is that we don't need any additional folders in /root. Hopefully this will be the case, as we're not sure what folders would need to be added for bash to work correctly (we assumed that it had been working fine all alonge)
 
Old 06-29-2015, 04:12 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Believe me, you don't need to fiddle with /root at all for your Slackware to work.

Out of curiosity, what makes you believe that you need something in /root that is not already there? For what purpose?

In any case, bash doesn't need anything special in /root. Furthermore, bash is used heavily to run all Slackware scripts, so if it missed something you would have found that already the hard way.

Last edited by Didier Spaier; 06-29-2015 at 04:14 PM.
 
Old 06-30-2015, 01:31 PM   #5
bignickel
LQ Newbie
 
Registered: Jun 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
Well, I noticed that there was no history being kept for Root user. Using the up arrow key only revealed the last 4 commands of that session (nothing I typed, but just startup commands for some media player).

What exactly should I see in the root home folder if the setup program configured correctly (both non-hidden and hidden files)?

My friend showed me his /root folder: it's full of the same kind of things that any user folder would have (desktop, documents, etc) and alot more files.
 
Old 06-30-2015, 01:53 PM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by bignickel View Post
Well, I noticed that there was no history being kept for Root user. Using the up arrow key only revealed the last 4 commands of that session (nothing I typed, but just startup commands for some media player).
The last commands typed through the bash interpreter are kept in the file . bash_history that you have, as indicated in your first post. To see them just type:
Code:
history
Of course you will get different results whether you type it as root or as bignickel.

Quote:
What exactly should I see in the root home folder if the setup program configured correctly (both non-hidden and hidden files)?
Exactly those that you have, listed in your first post.

Quote:
My friend showed me his /root folder: it's full of the same kind of things that any user folder would have (desktop, documents, etc) and alot more files.
This is most probably because your friend uses his or her root account to do everything as if it were a regular user's account. This is a very bad idea for security reasons, unless your never access the internet and be sure you will never make a mistake in a command that could erase your files and render your system unasable. For an explanation see User and Group Management.

Last edited by Didier Spaier; 06-30-2015 at 02:01 PM.
 
Old 06-30-2015, 03:05 PM   #7
bignickel
LQ Newbie
 
Registered: Jun 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
Ok, if I'm reading you correctly, you're saying that the below is exactly what you have in your own /root folder, or at least you did when you first installed 14.1. Is that correct? You have nothing else besides these files and folders?

This is a list of everything I have in /root:
total 32
drwx--x--- 5 root root 4096 Jun 30 15:00 ./
drwxr-xr-x 22 root root 4096 Jun 25 14:19 ../
-rw------- 1 root root 431 Jun 29 14:08 .bash_history
drwxr-xr-x 3 root root 4096 Jun 26 13:03 .config/
drwx------ 3 root root 4096 Jun 25 13:16 .dbus/
drwx------ 2 root root 4096 Jun 16 17:45 .gnupg/
-rw-r--r-- 1 root root 1198 Jun 15 12:21 .xinitrc
-rwxr-xr-x 1 root root 1198 Jun 15 12:21 .xsession*


This, on the other hand, is what my friend has (btw: he never does anything in root; he always does everything in a user account):

total 124
drwx--x--- 21 root root 4096 Jun 11 13:35 .
drwxr-xr-x 23 root root 4096 Jun 11 23:28 ..
-rw------- 1 root root 0 Jun 11 13:35 .ICEauthority
-rw------- 1 root root 0 Jun 11 13:35 .Xauthority
-rw------- 1 root root 9120 Jun 15 11:41 .bash_history
drwxr-xr-x 5 root root 4096 Jun 11 13:35 .cache
drwxr-xr-x 6 root root 4096 Sep 28 2013 .config
drwx------ 3 root root 4096 Sep 25 2013 .dbus
drwx------ 4 root root 4096 Jun 25 12:53 .gconf
drwx------ 3 root root 4096 Jun 13 00:04 .gnupg
drwxr-xr-x 2 root root 4096 Jun 11 13:28 .gstreamer-0.10
-rw------- 1 root root 148 Sep 25 2013 .gtk-bookmarks
drwx------ 2 root root 4096 Sep 25 2013 .gvfs
drwxr----- 2 root root 4096 Jun 11 13:28 .hplip
drwx------ 3 root root 4096 Jun 11 13:29 .kde
-rw------- 1 root root 83 Jun 13 00:04 .lesshst
drwxr-xr-x 3 root root 4096 Sep 25 2013 .local
drwx------ 4 root root 4096 Sep 25 2013 .mozilla
-rw------- 1 root root 8 Jun 11 13:15 .wpa_cli_history
-rw-r--r-- 1 root root 1198 Jun 3 11:03 .xinitrc
-rw-r--r-- 1 root root 1198 Sep 24 2013 .xinitrc-backup
-rwxr-xr-x 1 root root 1198 Jun 3 11:03 .xsession
-rwxr-xr-x 1 root root 1198 Sep 24 2013 .xsession-backup
drwxr-xr-x 2 root root 4096 Sep 25 2013 Desktop
drwxr-xr-x 2 root root 4096 Sep 25 2013 Documents
drwxr-xr-x 2 root root 4096 Sep 25 2013 Downloads
drwxr-xr-x 2 root root 4096 Sep 25 2013 Music
drwxr-xr-x 2 root root 4096 Sep 25 2013 Pictures
drwxr-xr-x 2 root root 4096 Sep 25 2013 Public
drwxr-xr-x 2 root root 4096 Sep 25 2013 Templates
drwxr-xr-x 2 root root 4096 Sep 25 2013 Videos

Last edited by bignickel; 06-30-2015 at 03:07 PM. Reason: added
 
Old 06-30-2015, 03:24 PM   #8
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by bignickel View Post
Ok, if I'm reading you correctly, you're saying that the below is exactly what you have in your own /root folder, or at least you did when you first installed 14.1. Is that correct? You have nothing else besides these files and folders?
I already told you that three times. I am on the verge of loosing patience. If you don't trust my answers just stop asking.

Quote:
This, on the other hand, is what my friend has (btw: he never does anything in root; he always does everything in a user account):

total 124
drwx--x--- 21 root root 4096 Jun 11 13:35 .
drwxr-xr-x 23 root root 4096 Jun 11 23:28 ..
-rw------- 1 root root 0 Jun 11 13:35 .ICEauthority
-rw------- 1 root root 0 Jun 11 13:35 .Xauthority
-rw------- 1 root root 9120 Jun 15 11:41 .bash_history
drwxr-xr-x 5 root root 4096 Jun 11 13:35 .cache
drwxr-xr-x 6 root root 4096 Sep 28 2013 .config
drwx------ 3 root root 4096 Sep 25 2013 .dbus
drwx------ 4 root root 4096 Jun 25 12:53 .gconf
drwx------ 3 root root 4096 Jun 13 00:04 .gnupg
drwxr-xr-x 2 root root 4096 Jun 11 13:28 .gstreamer-0.10
-rw------- 1 root root 148 Sep 25 2013 .gtk-bookmarks
drwx------ 2 root root 4096 Sep 25 2013 .gvfs
drwxr----- 2 root root 4096 Jun 11 13:28 .hplip
drwx------ 3 root root 4096 Jun 11 13:29 .kde
-rw------- 1 root root 83 Jun 13 00:04 .lesshst
drwxr-xr-x 3 root root 4096 Sep 25 2013 .local
drwx------ 4 root root 4096 Sep 25 2013 .mozilla
-rw------- 1 root root 8 Jun 11 13:15 .wpa_cli_history
-rw-r--r-- 1 root root 1198 Jun 3 11:03 .xinitrc
-rw-r--r-- 1 root root 1198 Sep 24 2013 .xinitrc-backup
-rwxr-xr-x 1 root root 1198 Jun 3 11:03 .xsession
-rwxr-xr-x 1 root root 1198 Sep 24 2013 .xsession-backup
drwxr-xr-x 2 root root 4096 Sep 25 2013 Desktop
drwxr-xr-x 2 root root 4096 Sep 25 2013 Documents
drwxr-xr-x 2 root root 4096 Sep 25 2013 Downloads
drwxr-xr-x 2 root root 4096 Sep 25 2013 Music
drwxr-xr-x 2 root root 4096 Sep 25 2013 Pictures
drwxr-xr-x 2 root root 4096 Sep 25 2013 Public
drwxr-xr-x 2 root root 4096 Sep 25 2013 Templates
drwxr-xr-x 2 root root 4096 Sep 25 2013 Videos
This output makes very obvious that on sept 25 2013 your friend used his root account to start X, and probably a desktop. Maybe he didn't use his root account on the dektop much since then, but he did that day.

Also, he started X on June 11 of the current year, and used that to print something (or at least tried to) on his HP printer and used KDE or at least a KDE application as root the same day.

Last edited by Didier Spaier; 06-30-2015 at 03:26 PM.
 
Old 07-05-2015, 10:33 AM   #9
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Member response

Hi,

Welcome to LQ!
Quote:
Originally Posted by bignickel View Post
Well, I noticed that there was no history being kept for Root user. Using the up arrow key only revealed the last 4 commands of that session (nothing I typed, but just startup commands for some media player).

What exactly should I see in the root home folder if the setup program configured correctly (both non-hidden and hidden files)?

My friend showed me his /root folder: it's full of the same kind of things that any user folder would have (desktop, documents, etc) and alot more files.
Your root account will keep history of the 'root' user. I like to use the console and maintain my systems as 'root'. I like to have my users setup;
Quote:
I like to provide my users with this;
Code:
sample .bash_profile;   
~$ cat .bash_profile 
#-----------------cut-----------------   
# .bash_profile
#08-30-06 12:21

# Source .bashrc
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

#-----------------cut end--------------

Code:
 cat .bashrc
#-----------------cut-------------------

#.bashrc
#08-30-06 12:20 

# Add bin to path
export PATH="$PATH:$HOME/bin"

# Dynamic resizing
shopt -s checkwinsize
#
#save bash history so as to share

shopt -s histappend
PROMPT_COMMAND='history -a'

# Custom prompt 
#PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' 
#08-29-06 11:40 gws 
if [ `id -un` = root ]; then 
 PS1='\[\033[1;31m\]\h:\w\$\[\033[0m\] ' 
else
PS1='\[\033[1;32m\]\h:\w\$\[\033[0m\] ' 
fi 
# 
# Add color 
eval `dircolors -b` 
#Terminus is a very nice Unicode font for the Linux console
#02-02-12 gws
#from dugan's site http://duganchen.ca/writings/slackware/fonts/

#04-30-12 11:41 removed
#
#if [ $TERM = "linux" ]; then
# setfont ter-v16n
#fi

# User defined aliases
alias cls='clear'
alias clls='clear; ls'
alias ll='ls -l'
alias lsa='ls -A'
alias lsg='ls | grep'
alias lsp='ls -1 /var/log/packages/ > package-list'
alias na='nano'
alias web='links -g -download-dir ~/ www.google.com'

#08-29-06 11:50

#To clean up and cover your tracks once you log off
#Depending on your version of BASH, you might have to use
# the other form of this command
 trap "rm -f ~$LOGNAME/.bash_history" 0

#The older KSH-style form
#trap 0 rm -f ~$LOGNAME/.bash_history


#-----------------cut end--------------
I let them modify to suit their needs.
Hope this helps!
The ~.bashrc has the prompt setup to identify the account type when you enter into the terminal/console. Where ~# identifies the 'rootuser' and ~$ idenfies a normal user so you will know at all times which is in use on that console. alias is a big plus when you want to use repeated abbreviated commands along with your history.

One special note as other members have identified; You need to use 'root' with caution since the superuser(root) is all powerful at the cli. You do not wish/want to trash your system by inadvertent command usage so you should always use caution when in a 'root' account. You do not want to run a DE as 'root' since this can open you to many issues/problems. I know some admins ignore this but will not relate to issue(s) they created while running a DE as root. 'superuser' is all powerful when it comes to your Gnu/Linux install. Treat it with care/caution!
Have fun & enjoy!
 
  


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
[SOLVED] thunderbird local folders missing CollieJim Linux - Software 5 02-11-2014 08:55 AM
Why my folders top part is missing sometimes? iindikaa Ubuntu 3 06-21-2011 08:42 AM
Folders created through Samba are missing!!! rwill Linux - Newbie 1 05-18-2009 08:26 AM
All folders and applications on the Desktop are missing poorboyiii Linux - Desktop 2 08-06-2008 02:08 PM
Missing folders when accessing samba share from XP IgniZtion Linux - Software 2 08-18-2004 11:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

All times are GMT -5. The time now is 10:15 AM.

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