Tag Info

Hot answers tagged

4

Easiest way to do this from the command line is to use the passwd command with root privileges. passwd username From man 1 passwd NAME passwd - update user's authentication token SYNOPSIS passwd [-k] [-l] [-u [-f]] [-d] [-n mindays] [-x maxdays] [-w warndays] [-i inactivedays] [-S] [--stdin] [username] DESCRIPTION The passwd ...


4

Your current login shell process keeps the group configuration it had before. Especially, compare the output of groups sachin with groups . After logout and login, the difference is gone. If you cannot relogin due to reasons unclear to me, you have to cascade the newgrp stuff. Imnternally, newgrp does nothing but "relogging in" in a new layer of ...


4

On Solaris /home is managed by the automounter by default. The simplest way if you don't need that functionality is to disable it. Just comment out the line that reads something like /home auto_home -nobrowse in the /etc/auto_master file and then restart autofs: svcadm restart autofs


4

You should create a new user as Hauke is right in indicating that creating two with the same UID is going to be confusing ( you could do that with useradd -u EXISTINGUID ... ) You probably just want to make a new user and make sure they are in the same group and that the group permissions are so that they can work with the data in the same group in the same ...


3

The command useradd needs some special privilege to modify the system settings. Hence, you get a permission denied when using it as a normal user. To be able to call useradd from a normal user, you need to configure sudo. It is not too complicated, see this tutorial: http://quaid.fedorapeople.org/sudo-tutorial/ especially chapter 4.


3

You can use chpasswd to do it, like this: echo "username:newpassword" | chpasswd You can pipe into chpasswd from programs other than echo, if convenient, but this will do the trick. Edit: To generate the password within the shell script and then set it, you can do something like this: # Change username to the correct user: USR=username # This will ...


3

The process's groups are set by the program that changes from root to the target user before executing the process's program. When a user logs in, the program that changes the user is the login program (login, su, sshd, …) and the process's program is the user's shell. For a daemon run under system user, the program that changes the user can be su or some ...


2

Basically you don't add, you change home directory. usermod -d /home/ftp/root root if you want to move existing files, use this: usermod -d /home/ftp/root -m root Allowing root to access via FTP it not good practice, it's security hole. Even if this, I would rather recommend to create symlink to target folder from existing directory.


2

Do all of your users have a single group in common? For example, on some systems the staff group is provided for use as the global group. If you create your users' home directories so they belong to this global group, just setting the read permission on them will allow all members of the group (i.e. everyone) to see other people's files. Note, though, that a ...


2

Set ADD_EXTRA_GROUPS and EXTRA_GROUPS in /etc/adduser.conf. From the manpage: ADD_EXTRA_GROUPS Setting this to something other than 0 (the default) will cause adduser to add newly created non-system users to the list of groups defined by EXTRA_GROUPS (below). EXTRA_GROUPS This is the list of groups that ...


1

useradd should work (I've done it on Ubuntu). Maybe check that each of your args are correct (thee groups exist, the path is right to bash). You can run the command with just a password and user, and then use userdel to remove and then retry with more parameters, to see what one causes the issue (brute force approach). There is also newusers (see the man ...


1

You can use OpenSSL to generate the random password (16 characters, in this case): # 1000 bytes should be enough to give us 16 alphanumeric ones p=$(openssl rand 1000 | strings | grep -io [[:alnum:]] | head -n 16 | tr -d '\n') Then feed the hashed password to useradd or usermod # omit the "-1" if you want traditional crypt() usermod -p $(openssl passwd ...


1

I was halfway through D_Bye's answer when I realised I could do it another way that doesn't require playing around with mounting and /etc/fstab: I created an account with its home catalog set to /home and set Pure-FTPd to enclose every user to his home catalog (ChrootEveryone YES). This means that this account may browse every catalog in /home but doesn't ...


1

With CentOS 6 nscd might be running. If you did not change the group ownership by a hig-level-command (like usermod) you have to make sure to run grpconv so /etc/gshadow gets updated as well. If nscd is running add nscd -i group to invalidate the local group cache. If you changed the primary GID run nscd -i passwd. Check the result with id -a $ACCOUNT. ...


1

It's an old question, but curious others can consider the command 'newusers'. This is present on both on a RHEL5.5 system and a Ubuntu 12.04 system that I use, so I'd take a guess it will available in the repositories for most distributions. From 'man newusers' The newusers command reads a file of user name and clear-text password pairs and uses ...



Only top voted, non community-wiki answers of a minimum length are eligible