Anything related with user accounts and user management on Unix-like systems.
7
votes
1answer
421 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
369 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
147 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 ...
8
votes
2answers
12k 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
2k 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
440 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
202 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
558 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:
...
2
votes
2answers
238 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 ...
3
votes
2answers
1k 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
274 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
1answer
2k 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
1k 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
52 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
3k 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 ...
6
votes
2answers
2k 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 ...
1
vote
1answer
912 views
Changing my default primary GID for every login session
I read the following about newgrp:
The newgrp command is used to change the current group ID during a
login session.
This made me think, how can I change my default's primary group ...
0
votes
1answer
280 views
Seem to be having a problem with RealVNC with centos can't input username
Hello I seem to be having a problem with RealVNC with centos. I want to connect to a another machine, but can't because it has been "grayed out". In otherwords, I can't type in the username in the ...
2
votes
2answers
487 views
Directory/files owned by a non-existent user
A user has created a directory with files, but the user does not exist in /etc/passwd or /etc/group. The system is a Fedora server with an FTP server and proxy which redirects to a CentOS server with ...
2
votes
3answers
4k views
How to create an unprivileged user in CentOS?
I want to create an unprivileged user to run my RhodeCode server and Celery daemon on a CentOS instance. I think the accepted definition of this is no home directory, login disabled, and no shell ...
0
votes
2answers
139 views
Can't login into webmin on a VPS
I bought a VPS server, and I have installed webmin on it.
When I want to login to webmin via:
http://88.198.196.118:10000/
it will redirect me to:
...
2
votes
2answers
438 views
su user fails with “grep: /var/cpanel/users/user: Permission denied”
I just did something pretty simple. Given a user user, I modified his user id, primary group's id, and added him to a new group in order to make my server use the same uid and gid as another server ...
2
votes
1answer
67 views
skill on your own session
So I kind of (read: did) run
skill -STOP -u <username>
on my own session... and I don't have root privileges on the machine. Short of getting the sysadmin to restore things (he's away), is ...
5
votes
2answers
997 views
How to restrict internet access for a particular user on the lan using iptables in Linux
Let's say there are two users on the LAN, A and B. How do I restrict user A from internet access using iptables rules and saving the rules so that after reboot, they are still effective. And suppose I ...
8
votes
2answers
982 views
How do I leave a message for another (local) user?
I know you can use write to send a message to a currently logged in user, but how do you leave a message for a user who is not logged in? The solution I have seen is modify the motd, but that will be ...
3
votes
2answers
125 views
Execute command on shared account login
At work our team uses a shared account "appadmin" to administer our application. At login, each one of us sources an "aliasrc" file containing his or her preferences. (aliases, display, prompt, ...).
...
2
votes
1answer
405 views
NFS to clients with different uid:s than on the server, where the client uid:s shall not show up in the server
I have a problem with a embedded Linux device that is mounting its root filesystem over NFS.
But for different reason the embedded device is a single user device running as root (and later it will ...
7
votes
3answers
439 views
Does character 'ä' in usernames cause bugs in linux systems?
I want to use my first name as an username but it contains character 'ä'.
I found this thread.
Now I understand, why some some characters are disabled, but what about 'ä'? Can this character cause ...
19
votes
5answers
878 views
Recovering from setting root's shell to a bad file
Let's say I've gone and done a silly thing, such as using 'chsh' to change the root user's shell to a bad file path. Future logins to the root account will abruptly fail, citing /bin/whatever not ...
3
votes
2answers
745 views
How to see who is logged on to many workstations?
Before I go to work creating my own I would like to find an existing system to do the following:
Provide a concise list of users logged on to any of the workstations
Show workstation host name, IP, ...
6
votes
1answer
191 views
Backing up and restoring a system user account
How would I go about completely backing up a user account and restoring it on a new system? The Home directory is just 'copy-and-paste'. But then what about things like the account password; and its ...
3
votes
1answer
769 views
User logged in by sftp does not show up in `w`
My server is Centos 5. I have a chroot environment set up with the following in my sshd_config
Match group sftponly
ForceCommand internal-sftp
ChrootDirectory %h
AllowTcpForwarding no
...
3
votes
1answer
1k views
smbpasswd failed for new Samba install on fresh Ubuntu 11.04
I've installed Samba on a fresh Ubuntu install. I run the command
sudo smbpasswd -a someuser
New SMB password:
Retype new SMB password:
Failed to add entry for user someuser.
I've read that you ...
2
votes
3answers
152 views
Group information reported wrong for a specific user
I have a problem on a server I manage. An account (specifically, my account) does not seem to have the correct groups. I think the problem is most easily demonstrated by looking at the following ...
2
votes
1answer
114 views
Suddenly changing users [closed]
Has anyone ever encountered a scenario where you are logged into a system going about your standard business, cat, ls, tail, grep, vim, find etc. and suddenly permissions to regular things stop ...
21
votes
3answers
6k views
Disable a user's login without disabling the account
Let's say I create a user named "bogus" using the adduser command. How can I make sure this user will NOT be a viable login option, without disabling the account. In short, I want the account to be ...
8
votes
2answers
2k views
How to apply changes of newly added user groups without needing to reboot?
Assume I'm logged in with user takpar:
takpar@skyspace:/$
As root, I've added takpar as a member of group webdev using:
# usermod -a -G webdev takpar
But it seems it has not been applied. because ...
3
votes
2answers
2k views
How can I have a separate umask for directory or user?
I want a separate umask for a directory or a user. How can I do this?
Edit:
I am using Debian 6.
The reason why I want to do this is, I want all my SFTP users to create files with write on group. ...
5
votes
3answers
7k views
Correct permissions for /var/www/html?
I'm able to write changes in the home directory, but when it comes to the /var/www/html folder, it's not allowing me to make any changes or create new files or folders.
I'm able to view the files in ...
6
votes
2answers
3k views
GID, current, primary, supplementary, effective and real group IDs?
The following links discuss these concepts in different contexts. I have read their definitions, but I still can't tell how they are related, or if some of them are just the same.
Current group ID
...
4
votes
2answers
252 views
Permanently switching to zsh in a script, without being root and without being asked for the password
Is there any way to run chsh -s /bin/zsh without being root and without being asked for the password? I want to put it into a non-interactive script that isn't called by root.
5
votes
4answers
10k views
How can I create and grant a normal user with root privileges?
I'm wondering how to create and grant a normal user (for example, named 'sybase') with root privileges?
I found useradd, adduser, and passwd to be useful, but are there any other files to modify to ...
2
votes
2answers
699 views
Can I allow a non-root user to log in when /etc/nologin exists?
Suppose a non-root user with sudo privileges executes a delayed shutdown (shutdown +10 or whatever) and logs out. Then, before the shutdown occurs, he wants to log back in and cancel the shutdown. The ...
4
votes
4answers
731 views
How sudo/root-ness detection works
Programs that make changes system-wide require sudo unless I am already the root user.
Now, the question is: how exactly does the system figure out that I am (not) root?
Does it:
Check to see if ...
3
votes
1answer
119 views
Duplicate a user, or at least the password
I have some application that needs to create users that have the same password as others. Is there a way to do this without having to edit the /etc/shadow manually? Some sort of command?
1
vote
1answer
200 views
Verify that /etc/passwd has correct number of fields on each line?
I'm looking for an easy, portable way to validate the number of fields in /etc/passwd, /etc/shadow, /etc/group and /etc/master.passwd. This would run on FreeBSD, Linux and other Un*xes. pwck does ...
5
votes
1answer
3k views
How can I create users with only remote ftp access on Linux server?
I'm running a Ubuntu 10.04 LTS server and I want to create users who can only access the server from ftp.
What I did so far is:
Install vsftpd
Create new user with default login shell set to ...
4
votes
1answer
308 views
Why do I need to use newgrp or su (or logout and login again) to have new group memberships applied?
What is it that makes new group membership require a new login (or new login shell as started by su or newgrp) to be visible?
Just running another bash (or whatever other shell) instance with --login ...
4
votes
2answers
10k views
How to add a ssh user who only has permissions to access specific folder?
How to add an ssh user who only has permissions to access specific folder?
useradd -d /var/www/xyz.com.tr/musteri -s /bin/bash -g sshd musteri
I created a user called musteri. I set its home ...
2
votes
2answers
122 views
How to create a new user without his own FS but with access to write to only one folder of user that creates him?
What are the command(s) to create a new user (not from su), give him the ability to write to only one folder which is some directory owned by an already existing user (the one that created him)? ...