General :: Why Does "ls -a" Hide Some Existing Directory From The Root User
Sep 2, 2010
Today I found something really interesting (at least to me) on one of our test servers:
I can change into an existing directory from my actual working directory using a relative path, but that very same directory is not listed when using ls -a.
Here is the shell session (as root):
$ pwd
/you/are/here
$ ls -a
. .. <-- Note: "somedir" is not shown to root
$ echo $CDPATH
[Code]....
I had checked the automount thing mentioned by Gilles, but as I had changed to somewhere and issued a mount|grep somewhere there were no output.
Here is the lsattr and strace output as suggested: [URL]
Does anybody know if it is possible to hide certain databases from the root user in MySQL?
It may sound stupid, since the root is the root and all that, and it may feel strange but it kind of adds a level of abstraction which I want to give the "root user", and I want to avoid going down the route of creating a new mysql instance on the server.
I had wondered if there is some kind of 'hide' parameter for a database or whether it is possible to change the root username to something else (e.g. 'realroot') and then create a new user 'root' with all the same privileges (except those on the hidden databases).
For a user on a Linux host, I need to make everything inaccessible besides his home directory. I have heard that this is usually done by changing the root directory for the user (and setting it to the user's home directory), however I couldn't find the way to do it.
I thought about the chroot command, but it seems it just runs the specified command, considering the specified directory as the root directory. So it seems chroot is not what i need. So my question is: what is the command which changes the user's root directory?
How is the best way to rename an existing user and his home directory under Debian Lenny? BTW I'd like to have the same settings like Desktop Icons, Bookmarks etc.
When I log on a root and attempt to issue the command Freshclam to upgrade the virus definitions it attempts or create a new file with a definition name. I get a message stating that the directory isnt writable. The user and group access rights are as follows:
USER = read, write, execute Group = read, write, execute All= read, execute.
The only way I can get around this is by applying a 777 which would be read, write and execute for all. Now, I have a group define with several user ids in it including Root.How do I connect the group with the directory/file so I dont have to apply a 777 access right to group users could issue the Freshclam command.
Or would this sacrifice security in some way? I've been using root only, and am ready to have a seperate account now. It's the dotfiles for GUI apps that I'm concerned about:
Code: -rw------- 1 root root 98 Feb 13 16:23 .Xauthority -rw------- 1 root root 6392 Feb 12 18:13 .bash_history drwx------ 5 root root 4096 Jan 13 17:47 .config drwxr-xr-x 4 root root 4096 Dec 29 21:36 .fvwm drwx------ 4 root root 4096 Nov 7 19:55 .mozilla -rw------- 1 root root 218 Jan 26 10:04 .recently-used.xbel -rw------- 1 root root 98 Feb 13 16:23 .serverauth.17096 drwxr-xr-x 2 root root 4096 Dec 25 12:42 .tuxcmd drwxr-xr-x 2 root root 4096 Feb 12 17:25 .xine
I no longer have access to my root desktop. On a session I attempted to change the root username but i apparently assigned it a wrong directory that does not exist. When I rebooted with my new root username, i was instead recognised as a simple user (no root privileges). I tried the console to change to "old" root but root password is not accepted and there is no way to access to sudoer files. it seems that inserting a new username requires root privileges and i am back to square one. Simply logging with old root username and password after restart gives me a blank screen with nothing on it and cannot even reboot.
I have an existing unix user that some how didnt make it into the copy over to our LDAP server. How do I add an existing unix user to an existing LDAP directory? Will ldapadd work? I was under the impression ldapadd required an ldif file to work properly.
Is it possible for a non-root user to hide themselves from the output of who/w, so that they can be logged in without other users seeing it? I think that the file /var/run/utmp might have something to do with this, but it's not writeable by non-root users (permission 644). I'm fairly certain that this can be done by a non-privileged user (because someone told me that they were able to do so), but I don't know how they did it and can't ask them right now.
I did a fresh fedora install and have overwritten the root user directory ( /root) with a backup of a previous install. Now I cannot log on through the login screen with the root user password. I can login su - as root on the command line with the password OK.
I was wondering if it was possible to hide the File Systems from a user. So when then browse through folders or choose to save something the default folder is their "home" folder. I am using SAM Linux distribution and don't want my users to be able to screw anything up! I use thunar as my file manager and was just wondering if it is possible?
I need to create an SSH user that can only access the directory I would specify for them. For example, I've been able to execute the following: useradd -d /home/me/directory_for_this_user someuser
So when someuser logs in they get into this directory. Problem is that once they log in they can simply execute: cd / and navigate through all other directories which is a security risk.
How I could limit someuser's access to only /home/me/directory_for_this_user and its subdirectories and nowhere else in the system?
I would like to know the command to change or add GECOS field of existing user. when i tried to find the command i end up getting this which is only valid for new user account.
Code:
useradd --help -c, --comment COMMENT set the GECOS field for the new user account My system details.
Code:
# lsb_release -a LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch Distributor ID: OracleVMserver Description: Oracle VM server release 2.2.0 Release: 2.2.0 Codename: n/a
I have a machine which has only /opt with some decent amount of space where I can install a software. /opt belongs to root:root. The software I want to install cannot be installed as root user.
So lets say I create a directory called /opt/install1 and then chown -R install1 to belong to user1. And now I install the software under /opt/install1 with user as user1.
Is this a best practice violation? There could potentially be just /opt/install1 belong to user1 and in future everything else created under /opt belonging to root..
I am trying to run a cron job as an oracle user. I put the user in the cron.allow file but it still won't run. Other users are able to run a cron job though. I think it's the way the oracle user was created and I wanted to recreate it. However it owns a lot of other file systems as well as the database. Is there a way to recreate or reset the oracle account without impacting what is currently in place?
i used opensuse 11.1 ...there is option for root user to create password for root...but for ubuntu i did not find anything like that...so how can i create root password....or how can i use root
i just installed linux mandriva 2009. i set password for root and created a user account. when i try to login as root, after logging out as user, it does not allow me and gives the error "root logins are not allowed". even it does not show the root account. if i try to go to root from konsole terminal using su root, it allows to enter as a root but when i try to start the GUI with startx it gives error.not sure what to do and why i can't see my account in GUI mode
what is the correct way/procedure to re-create a user home directory. For instance, on a Mac/Windows machine, i would just rename the existing user profile [home dir], and then just log back in as the user - job done. On OpenSuse/Linux, it seems it does not work that way..?! When i try to rename my home folder to say me.old via root, and log back in as me, i get all kinds of errors. Opensuse does create a new home dir, but it appears not properly.
I am using mint 8 for a 2 weeks, I am noob to linux but I like Mint than any other linux distro which is great alternative to windows. I have a problem regarding password reseting.
1. My laptop automatically get logged in without asking user name and password.
2. I tried to change password for newly created user and root user using graphical way but it does not work.
2. I can perform administrator task using only OEM user which is default inbuilt user of mint.
How can make my laptop to ask password when mint get booted? How to change password for other users?
I'm developing an application in which one user must run java software that I'm compiling as another user. I wanted to give user A permission to see the bin direcory of my workspace, which is in the home directory of user B. I was wondering how can this be done? I gave the bin direcotry full read/execute premissions, but since it's in my home directory user A can't navigate to it.
I know there are a few ways I could get around the problem but they arn't very elegant. I was wondering if there is a simple method for giving a user access to a specific directory without giving access to all the parent directories. I tried symbolic link but user A still can't access it, and a hard link to a directory isn't allowed in Linux. I don't feel like making a hard link to every single file in the bin directory, and I'm not sure that would work anyways, since every recompile overwrites them.
i'm new to linux and just installed Ubuntu and decided to play around with it. i just executed
Code: useradd test which supposedly creates a folder in the home directory '/home/test' but when i look in there i can't see it i also did a
Code: grep test /etc/passwd which returns: 'test:x:1001:1001::/home/test:/bin/sh' which i believe means it is meant to exist.
Addendum: I have also now noticed that when i log in and log back in i have the option to login as 'test' but it prompts me for a password which i did not set :s
Is It possible to change a process running in root-user to non-root-user by setting suid / uid / euid / gid etc... I so please instruct how, when and wat to set in order to change a process running in root-user to non-root user
root user won't be able to read the "active" xguest home directory (ll /home/xguest will only show an almost empty folder with content from /etc/skel). How can a root user list the folder of an the xguest home directory (while xguest is logged in)?
This sounds like an old topic. I have an active user account in my system that I don't want it to be listed in GDM greeter. In the past (prior to Gnome 3), it can be achieved by configuring the "Exclude" option of the "greeter" section in the Custom.conf or by creating the user account with UID smaller than MinimalUID. But it seems the same old trick does not work for me in Gnome 3. I have tried the "Exclude" option with no effect at all. Using the UID approach only solves my problem partially, as it only exclude it in the GDM greeter during "switch user" but it still being shown in the list in the initial greeter after a cold boot.
If you need to to exclude one or mode user from your gdm login window you must edit "/etc/gdm/gdm.schemas" and add the user you want exclude from the <key> "greeter/Exclude" (near the other user in <default></default>)
I actually got my boss to let me put Ubuntu on a laptop for a client and it works like a champ. I have it all setup but there's one thing I'd like to do on it. I have an admin user (the one I created during the install) and a desktop user (for the person receiving the laptop). I would like to hide my admin user from the login screen, so when it boots up all the user sees is their name. If I need to help them with something/install software I can choose other and login as my admin user.
It appears this was rather easy in 9.10 and previous but I can't figure out how to do it in 10.04. To be clear, I want to edit the user list, not disable it entirely. I've tried changing the user id, I found a post that claimed IDs less than 1000 were not shown on the login screen, this proved un-true in my case.