Anything related with user accounts and user management on Unix-like systems.

learn more… | top users | synonyms

3
votes
3answers
12k views

How can I look up a username by id in linux?

The command id can be used to look up a user's uid, for example: $ id -u ubuntu 1000 Is there a command to lookup up a username from a uid? I realize this can be done by looking at the /etc/passwd ...
5
votes
1answer
395 views

Run script when specific users logout

I need to run my application in screen when specific users are logged out and kill the screen when someone from my user list logged in. So I am thinking about bash script, which will be called ...
2
votes
1answer
321 views

Why am I not able to login directly using SSH

Suppose, the server address is abcd.com. On my local machine at my workplace, I have to login to that server, using ssh <my employeeid>@abcd.com Then, to login to user myname , I have to use ...
4
votes
3answers
522 views

Extract dates from /etc/shadow

The file /etc/shadow has a couple date fields that are expressed as the number of days since Jan 1, 1970. Is there an easy way using to get a list of users and the calendar date of the last password ...
10
votes
4answers
11k views

can we know the password for the other users if we have root access?

If a person has root access to a particular RHEL machine, will they be able to retrieve the password of the other users?
7
votes
2answers
384 views

How do I add network or user source connection data to history entries?

I would like to modify the history settings for all users on the systems that I manage. I would like it to contain the information from the connecting terminal like from who sysadmin:/ # who sysadmin ...
0
votes
2answers
213 views

Best practice when installing programs in FreeBSD?

Just started with FreeBSD and I am not sure whether I need to be root to install programs or not? For example, the manual for installing X11 never says that we should issue su command. However - it ...
2
votes
1answer
226 views

dm-crypt and LUKS password rotation

How do you protect the master key, and distribute multiple passwords for admin access? Is there a 3rd party user management tool or is this native?
10
votes
2answers
10k views

How to create a user with limited RAM usage?

So I have 4 GB RAM + 4GB swap. I want to create a user with limited ram and swap: 3 GB RAM and 1 GB swap. Is such thing possible? Is it possible to start applications with limited RAM and swap ...
6
votes
1answer
398 views

How to disable Switch User option from Fedora 15

Is there a way to disable the Switch User option from a locked screen on Fedora 15? I've tried this way, but no luck, since gconf-editor has no effect.
1
vote
1answer
5k views

switching from user to root and revers (freebsd)

i want to make some modificaciones with root and then with my user, in fact i want to install sudo and he give me the error in the first step: cd /usr/ports/security/sudo make install clean ...
3
votes
1answer
737 views

How to clear the last -10 info?

How to clear the last -10 information only for a Linux system? I tried to execute the command > /var/log/wtmp to clear the last info, but it clears the whole login info , but I need to clear only ...
3
votes
2answers
3k views

new user can't login in Mint

I have created a new user in Mint 12, with this commands: sudo useradd irene sudo passwd irene //here I entered the password But if I try to login with this user the screen goes black for a ...
1
vote
2answers
1k views

Allow non-root process to access all home directories without compromising security?

Any ideas how to allow one non-root process to access (read&write) all home directories without compromising security? Normal users should not have access to each other's home directories. All ...
2
votes
3answers
120 views

Is unix good with many users/groups?

If I have 10,000 webapps on my server and I'd like enhanced permissions and make a user for every app (/var/www/NAME will have a matching /tmp/www/NAME), will everything be fine or will problems occur ...
1
vote
2answers
3k views

Changing user in a script?

I am trying to change user in order to execute a specific command during startup. It fails silently and apparently the userchange isn't carried out as I can tell that the command isn't executed. What ...
5
votes
2answers
705 views

How to mass change password attributes in AIX uname -rv=3 5 for all users but root

I want to do a mass change on all users but root in AIX for the following "password attributes": Weeks before password reuse: 15 Password min length: 6 Can it be done, or do I need to do them one ...
2
votes
1answer
154 views

How do I stop Apache from running as root?

New on the job, small place, and the security stuff just landed on my desk. I was hired to be a front-end developer. Happy to learn new things, but never had to do sysadmin stuff before. I started ...
2
votes
1answer
785 views

Ubuntu 11.10 Server: create user, home directory, sudo privileges: command line only

I have a rackspace server and I'm having problems with configuration. I need to lock it down and throw away the key, because right now I can only login with root to do anything substantial. I also am ...
3
votes
3answers
5k views

Can I search bash history across all users on a server?

I want to see all bash commands that have been run on a Linux server across multiple user accounts. The specific distribution I'm using is CentOS 5.7. Is there a way to globally search .bash_history ...
10
votes
2answers
33k views

What user should apache and PHP be running as? What permissions should /var/www files have?

I just spun up an Ubuntu 11.10 box and then ran apt-get install apache2 php5 to install apache2 and PHP 5 on the box. Now it is functioning as a "web server" and it loads the "It Works!" page. Now I'm ...
3
votes
1answer
574 views

How do I add a local user to a box that uses LDAP authenticaiton?

I'm working with a box that uses LDAP for user authentication. However, I need to add a local user to run some services and I don't want non-person users junking up the LDAP directory. Does anyone ...
3
votes
1answer
4k views

How do I set the user of php-fpm to be php-user instead of www-data?

I am using php-fpm on debian with nginx for php5 support. I would like to have php-fpm to be under the user&group php-user instead of www-data. I thought the init.d script would have the user ...
0
votes
3answers
11k views

How can I list all user names on Solaris 10?

I forgot a user that I created on solaris 10, so now I would like to list all user names on my server. Is it possible (I am root user)? What command I should use if possible? Somewhere on the net ...
49
votes
5answers
60k views

How do I remove a user from a group?

Which command should I use to remove a user from a group in Debian? When adding a user to a group, it can be done with: usermod -a -G group user However, I could not find a similar command ...
2
votes
1answer
105 views

Fedora15/Gnome3 - Exit elevated priviliges mode

While using Fedora 14 (Gnome2), Each time if I was doing some privileged task (ex - mounting a new hard drive), I would be prompted for password and then there would appear an icon (like keys) on the ...
3
votes
3answers
776 views

Killing other user processes

There are certain user environments in which we have to login during certain performance testing and and kill all the process running in that environment. The environment names are like rswrk01, … up ...
1
vote
5answers
2k views

Hiding User from Last Command

Is there any way to hide a particular user's login entry from other users who run the last command?
5
votes
5answers
900 views

Why is it recommended to create a group and user for some applications?

Most of the time, when installing a program from source it is recommended to create a new user and a new group and give /usr/local/<myapp> the recently created user and group ownership. Why is ...
5
votes
3answers
1k views

Changing the UID of files in /proc

In a follow up to this question about changing the UID of a user, it is recommended to change the ownership of all files on the system (this answer) find / -uid 1000 -exec chown 5000 '{}' \+ where ...
2
votes
1answer
137 views

Where can I find a reference to the format of the comment field (field 5) of the /etc/passwd file?

In the /etc/passwd file on my system, the "comment" field, field 5, is inconsistent in its contents. I thought that I could extract it to get the full name of the user. fullname=`awk -F: '$1 == name ...
13
votes
5answers
4k views

Add a user to the system *only if it doesn't exist*

I've been running the useradd {user} command to add users to my system, though I plan on running this in an automated environment, and it might end up being run again, even though the user already ...
1
vote
1answer
209 views

permission and user/group of a program executed through a script

I am curious, in the following scenario, what kind of permission does a shell script or Java program has (owner/group/other)? There is a script called run.sh, and it in turn calls a Java program ...
8
votes
1answer
340 views

Why does the 'w' command show phantom logged in users?

On Linux (Fedora 14), the "w" command says this: [USERNAME@PC ~] w 23:51:32 up 13 min, 7 users, load average: 0,22, 0,42, 0,34 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT ...
7
votes
1answer
559 views

Lightweight virtualization on Linux with user isolation

What Linux-on-Linux virtualization technologies provide user isolation? Specifically, I want root in the virtual machine not to have any privilege on the host. This was not the case for LXC, but was ...
2
votes
1answer
400 views

How to create a sudo user that cannot delete me?

I'm sudoer on a remote linux machine and would like to create another user with the maximum privileges, except the privilege of managing my account. I'm assuming a sudoer can delete or change the ...
1
vote
1answer
357 views

Create / Edit files in specific folder using different user / group

I want to know if the following scenario is possible. I am a user called www-admin and I am in the group www-admin. I am also a sudoer. I want to have all the files I create in the folder ...
13
votes
2answers
26k views

How can I change a user's default group in Linux?

Being new to Linux administration, I'm a little confused about the following commands: useradd usermod groupadd groupmod I've just finished reading the user administration book in the Linux/Unix ...
8
votes
1answer
5k views

How do I set a user's default .bashrc file?

On Ubuntu 10.4 I have edited the /etc/bash.bashrc file to set some variables like the command history size (HISTSIZE=5000), however if I create a new users Ubuntu by default gives them a .bashrc file ...
2
votes
1answer
688 views

Deny external SSH access to a user

Is it possible to deny access to a user (in my case www-data) from outside the network? Or possibly deny this: ssh www-data@example.com But allow this if already logged in: su www-data
1
vote
1answer
321 views

Broken PATH in CentOS 5.x

I am having troubles with typing commands within the terminal on some of our CentOS servers. For example, I have to include the complete and full path to the command (i.e. /sbin/chkconfig vs. ...
3
votes
2answers
1k views

'mysql' user and group creation, ownership settings

I know what the linux command chown does, I used it to change the ownership or group of a file. If there is a MySQL installation on a Ubuntu machine, I saw some people doing the following thing: ...
3
votes
2answers
665 views

Bash is not fully functional for a new user

I just created a new user on my system using useradd -d /home/users/john -m john (Using Ubuntu 11.04). This worked fine, but when I changed to john, my bash is not fully functional. That is, it has no ...
5
votes
2answers
2k views

Running a bash script as a less privileged user with upstart

This is the script, /home/jack/myscript.sh, which I want to run: export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.26/ /home/jack/myapp/apache-tomcat-6.0.32/bin/./catalina.sh run The upstart file, ...
3
votes
2answers
550 views

A question about permissions of hierarchical directories

I have some directories, with following permissions: drwxr-xr-x 18 user1 root 4096 Oct 27 11:25 /home/test1/test2 drwxr-xr-x 24 user1 root 4096 Oct 21 08:38 /home/test1 drwxr-xr-x 492 root root 12288 ...
3
votes
2answers
5k views

Will a users password expire if I set the “maxexpired” to “-1”? [maxage not 0] - AIX

So under AIX 6, according to "lsuser" the user has the following settings: maxexpired=-1 maxage=2 So this means that 2 weeks after the last password update of the user the password will expire, but ...
1
vote
1answer
3k views

How to show and modify user info in Ubuntu server?

If I want to put some personal information (like Full Name) to an account, how can I check it again? And how can I modify it? On Ubuntu server. With command line only.
1
vote
1answer
64 views

Is it possible to log in in a host with an user created for programs like apache or postgreSQL?

I am wondering whether is it possible to log in in a computer with users like www-data or postgres as I do with my own user. Are some users "allowed to log in" while others not? Is there any ...
2
votes
1answer
6k views

Changing user and group ID system wide (including file system attributes)?

(this question possibly related to Linux: simulating/masking user ownership upon mount of 'external' partitions? - Stack Overflow) I typically use Ubuntu (currently 11.04) as my desktop OS; let's say ...
7
votes
2answers
4k views

Why is sudo telling me my password is wrong?

I recently installed OpenBSD 4.9 in my computer, so I could learn a little bit about Unix-like operating systems. I added a new user to the system called bruno. Ok. When I use the 'sudo' command, it ...